How to use a Pro Micro as a cheap controller/converter

User avatar
Hypersphere

02 Jan 2019, 20:00

twasa wrote: I'm using the converter I believe (Soarer_at2usb_v1.12_atmega32u4.hex). Good for you St0ckz, I'm hoping to also get this to work, without knowing enough yet about what I'm doing. :D
You might try using qmk_toolbox. This worked for me on a Pro Micro.

https://github.com/qmk/qmk_toolbox/releases

User avatar
Darkshado

03 Jan 2019, 06:33

twasa wrote: Code Set: 1
Mode: PC/XT
[/code]
That doesn't look right to me, I'd expect code set 3 for terminal M122s.

twasa

03 Jan 2019, 20:02

@Darkshado, that's what I was expecting too. I am stumped, since I don't know why the board gets identified as code set 1, which I suspect is why I don't get any keys to register.

mxgian99

05 Jan 2019, 05:40

i agree that it should auto-sense, and that points to a wiring issue, but have you tried forcing it to code set 3 to see if it's just an auto-detection issue?

twasa

05 Jan 2019, 12:33

Thanks mxgian99. I tried that with the same result. hid_listen does not register any key press. I'll check the wiring to the pro micro again.

pandrew

05 Sep 2020, 03:49

Hey All,

Just in case anyone is looking for an experimental version that might work with 3V3 Pro Micros, please see attached .hex file.

Details:
I started with the following .hex file: resources/slightly-changed-sc-v1-12/15676
Which I found a link to here: http://joefreeman.weebly.com/uploads/1/ ... _micro.pdf

This appears to be a modified version that exposes the reset line too on PB6 (read that .pdf), the default release I think has it on a pin that is not accessible on the pro micro, but it's otherwise accessible by other atmega32u4 boards.

I disassembled it, and looked for "out 0x29" instructions.
These instructions write the PLLCSR register.

Basicly for 16MHz pro micro the PINDIV bit of this register must be set, but for 8MHz Pro Micro PINDIV must not be set.
I found the following sequence:
│ 0x000016fc 82e1 ldi r24, 0x12
│ 0x000016fe 89bd out 0x29, r24

And I changed it to:
│ 0x000016fc 82e0 ldi r24, 0x02
│ 0x000016fe 89bd out 0x29, r24

After this change, if flashing the modified .hex file (see attached), then the 3.3V Pro Micro successfully enumerates.

Note: You probably need to short the J1 pads on the Pro Micro to force it to operate at 5V.

Note2: I have not tested this with a keyboard, and it's not guaranteed that this will work with the keyboard, there could be other timing sensitive elements in the firmware that assume that the CPU is running at 16MHz, in which case more mods are needed.

If you try this please report back here.

Andrei
Attachments
Soarer_at2usb_v1.12_atmega32u4_ProMicro_Reset_Modded_For_8MHz.hex.zip
(15.59 KiB) Downloaded 185 times

vibierendi13

11 Nov 2020, 08:44

how did you guys determine that line is clock data + 5v when the board is unmarked

kmnov2017

11 Nov 2020, 08:57

vibierendi13 wrote:
11 Nov 2020, 08:44
how did you guys determine that line is clock data + 5v when the board is unmarked
Usually the controller chip schematics are public. Use a multimeter to trace back cable leads to what is VCC and GND. For Data and Clock, just try both options until it works ....

vibierendi13

11 Nov 2020, 19:57

kmnov2017 wrote:
11 Nov 2020, 08:57
vibierendi13 wrote:
11 Nov 2020, 08:44
how did you guys determine that line is clock data + 5v when the board is unmarked
Usually the controller chip schematics are public. Use a multimeter to trace back cable leads to what is VCC and GND. For Data and Clock, just try both options until it works ....
thanks for rep bro...i try

Argan12345

01 Dec 2020, 04:25

Just a note for Windows 10 or other users on reflashing. While I was able to find the /dev/ttyXXX device added when I would put my keyboard in bootloader mode, it would never find the device eg:

Code: Select all

avrdude -p m32u4 -P /dev/ttyS2  -c avr109  -U flash:w:adds_ascii_usb_atmega32u4_numpad_fkey_remap.hex
Would return:

Code: Select all

avrdude: ser_open(): can't open device "/dev/ttyS2": The system cannot find the path specified.
Even though I could clearly see the thing go into bootloader mode.

What I had to do was figure out which "COM" device was added when I put it into bootloader, I did this by using AVRDUDESS (GUI program for AVRDUDE) and see which COM device was added to the dropdown list when I put it into bootloader (it was COM3 for me).

I then ran

Code: Select all

avrdude -p m32u4 -P COM3  -c avr109  -U flash:w:adds_ascii_usb_atmega32u4_numpad_fkey_remap.hex
Which finally worked. Now someone give me back 2 hours of my life please.

Arakula

14 Jun 2024, 08:31

pandrew wrote:
05 Sep 2020, 03:49
Hey All,

Just in case anyone is looking for an experimental version that might work with 3V3 Pro Micros, please see attached .hex file.

Details:
I started with the following .hex file: resources/slightly-changed-sc-v1-12/15676
Which I found a link to here: http://joefreeman.weebly.com/uploads/1/ ... _micro.pdf

This appears to be a modified version that exposes the reset line too on PB6 (read that .pdf), the default release I think has it on a pin that is not accessible on the pro micro, but it's otherwise accessible by other atmega32u4 boards. [...]
Note2: I have not tested this with a keyboard, and it's not guaranteed that this will work with the keyboard, there could be other timing sensitive elements in the firmware that assume that the CPU is running at 16MHz, in which case more mods are needed.
Sorry for the late reply, I was off for some years ...

The .hex file you started from is mine, described here, in this thread, on page 2. FWIW, I'd recommend starting from the revised verion described a few posts later.
Looks like you're about to embark on a journey I took about 8 years ago, which is documented here, in this thread, on page 8. It's a bit more involved than you might think ... if you want to go for it on your own, have fun. Otherwise you might use my 2016 version (available at the mentioned post) that already does it and works on an 8MHz Pro Micro.

Post Reply

Return to “Workshop”