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

Ivich

25 Nov 2018, 19:14

I didn''t think to try another keyboard. Well I connected a Focus 2001 through the pro micro and it at least sort of works, some keys repeat but it does type, meanwhile the Model F does nothing. So that seems to confirm that something is wrong with the keyboard, thats too bad. Well thanks anyway.

twasa

02 Dec 2018, 18:19

I think I've seen reports of the usb connector on the pro micro's not being very secure and that one would need to glue them. Is this a general issue?

User avatar
ThePillenwerfer

02 Dec 2018, 18:28

I certainly wouldn't like to trust them far. I boxed mine up in such a way that there's no strain/wiggling on the socket.
Soarer.JPG
Soarer.JPG (179.56 KiB) Viewed 7456 times

twasa

21 Dec 2018, 18:24

I spent a frustrating afternoon attempting to flash Soarer's converter to a pro micro. All I get is the following error message:

Connecting to programmer: .
Found programmer: Id = "@ d"; type =
Software Version = D. ; Hardware Version = É._
avrdude: error: buffered memory access not supported. Maybe it isn't
a butterfly/AVR109 but a AVR910 device?

I tried two different cables and all of the usb ports on my machine.

This is what I use:

avrdude -p m32 -P com3 -c avr109 -U flash:w:Soarer_at2usb_v1.12_atmega32u4.hex on Windows 10 64-bit.

A general wave in the direction of a solution would be much appreciated.

User avatar
ThePillenwerfer

21 Dec 2018, 18:30

The obvious thing is that -p m32 should be -p atmega32u4.

twasa

21 Dec 2018, 18:48

That's where I started, but that just brings up a list of supported parts, of which atmega32 is the closest, with m32 as the shorthand name. It is a 32-bit avrdude executable, which I think I should look for again. It may be an older version perhaps.

User avatar
ThePillenwerfer

21 Dec 2018, 19:03

The the latest version for Windows seems to be 5.10 from: https://sourceforge.net/projects/winavr/

You could try -p m32u4 as that seems to be the supported:—

Code: Select all

C:\users\Joe>avrdude -p ?

Valid parts are:

  [.....] 
  m32u4 = ATmega32U4      [C:\WinAVR-20100110\bin\avrdude.conf:11880]
  [.....]
  m32  = ATMEGA32        [C:\WinAVR-20100110\bin\avrdude.conf:6285]
  [.....]

I'm not much help as I always do that sort of thing on Linux.
Last edited by ThePillenwerfer on 23 Dec 2018, 00:30, edited 2 times in total.

User avatar
Hypersphere

22 Dec 2018, 21:26

I've been able to flash Soarer's converter to a Pro Micro ATmega32U4 using QMK_Toolbox. However, I have been unable to flash Hasu's xt_usb converter this way.

On the other hand, I was able to flash Hasu's xt_usb converter to a Teensy 2.0 using the teensy.exe loader in Windows 10.

User avatar
Quartz64

22 Dec 2018, 21:45

Pro Micro uses 'Caterina' bootloader and it will only stay for a few seconds in it when you short a reset pin to ground. See Let's Split flashing guide for details about drivers and using avrdude or avrdudess (GUI for avrdude) to flash a Pro Micro.

User avatar
Hypersphere

22 Dec 2018, 22:15

A handy feature of QMK_Toolbox is the auto-flash. It will flash the chip as soon as the pins on the Pro Micro are shorted.

twasa

23 Dec 2018, 07:55

Thanks ThePillenwerfer, using avrdude from the latest WinAVR worked.

twasa

02 Jan 2019, 13:55

Just a sanity check if someone knowledgeable is around. I'm connecting an M122 (1390718) to a blue Pro Micro. Are these also correct for that keyboard:

Black -> VCC
White -> GND (third away from the usb connector)
Red -> 3
Yellow -> 2

User avatar
St0ckz

02 Jan 2019, 14:08

twasa wrote: Just a sanity check if someone knowledgeable is around. I'm connecting an M122 (1390718) to a blue Pro Micro. Are these also correct for that keyboard:

Black -> VCC
White -> GND (third away from the usb connector)
Red -> 3
Yellow -> 2
gnd on my blue pro micro is 2nd in that row, but otherwise correct.

Typed on my M122 I opened to check :lol:

twasa

02 Jan 2019, 14:16

Thanks St0ckz. Looks like I have J1 top, then Tx0, Rx1, GND, GND, 2, 3 etc. Do I use the first GND?

User avatar
St0ckz

02 Jan 2019, 14:42

twasa wrote: Thanks St0ckz. Looks like I have J1 top, then Tx0, Rx1, GND, GND, 2, 3 etc. Do I use the first GND?
so usb port facing away from you

White wire, right hand side, 2nd down marked GND
Black wire, right hand side, 4th down marked VCC
Yellow wire, left hand side, 5th down marked 2
Red wire, left hand side, 6th down marked 3

twasa

02 Jan 2019, 14:44

Thanks a lot St0ckz! I would have wired it incorrectly. That is completely clear.

User avatar
St0ckz

02 Jan 2019, 14:47

twasa wrote: Thanks a lot St0ckz! I would have wired it incorrectly. That is completely clear.
You are most welcome, i just finished doing mine today in fact, it's a nice board. A tad loud compared to the lubed retooled blacks I usually run though :lol:

twasa

02 Jan 2019, 16:03

One step forward, soldering the wires to the pro micro successful. Fired up hid_listen:

Code: Select all

Waiting for device:....
I connect the keyboard to a usb port:

Code: Select all

Listening:
wEE

remaining: FFFC

Keyboard ID: 0000
Code Set: 1
Mode: PC/XT

R05
And then nothing happens when I press a key on the keyboard. Any suggestions to proceed from here? (Sorry this is my first attempt at this.)

User avatar
Hypersphere

02 Jan 2019, 16:51

@twasa: Have you checked the wiring and loaded a hex file?

twasa

02 Jan 2019, 16:59

@Hypershere Yes, the loading of the hex file was my first hurdle. I checked the wires that I soldered to the pro micro and they correspond to the advice St0ckz gave.

User avatar
Hypersphere

02 Jan 2019, 17:01

twasa wrote: @Hypershere Yes, the loading of the hex file was my first hurdle. I checked the wires that I soldered to the pro micro and they correspond to the advice St0ckz gave.
Have you tried 1k pull-up resistors between clock and Vcc and between data and Vcc?

twasa

02 Jan 2019, 17:08

@Hypershere No I haven't. I thought those were only needed when one uses a long cable. I'm testing with a very short one.

User avatar
St0ckz

02 Jan 2019, 17:10

twasa wrote: One step forward, soldering the wires to the pro micro successful. Fired up hid_listen:

Code: Select all

Waiting for device:....
I connect the keyboard to a usb port:

Code: Select all

Listening:
wEE

remaining: FFFC

Keyboard ID: 0000
Code Set: 1
Mode: PC/XT

R05
And then nothing happens when I press a key on the keyboard. Any suggestions to proceed from here? (Sorry this is my first attempt at this.)
I need to know how far you've gotten, have you extracted soarers?
set up an enviroment variable?

There's a bunch of steps so it would be good to know what you've done so far

twasa

02 Jan 2019, 17:23

@St0ckz: So far, I have flashed the Soarer hex file to the pro micro and then soldered the wires as you said I should. The original cable of the keyboard was forcibly removed, leaving behind the little black connection box that connects the cable to the pins on the pcb. I soldered the wires that remained from that connection box to the pro micro.

I'm pretty sure I haven't set up an environment variable.

User avatar
St0ckz

02 Jan 2019, 17:46

twasa wrote: @St0ckz: So far, I have flashed the Soarer hex file to the pro micro and then soldered the wires as you said I should. The original cable of the keyboard was forcibly removed, leaving behind the little black connection box that connects the cable to the pins on the pcb. I soldered the wires that remained from that connection box to the pro micro.

I'm pretty sure I haven't set up an environment variable.
Only thing I can think of is that the actual keymap file isn't there.

(I have no idea what an enviroment variable actually is, I just have a very knowledgable friend)

Let's start at the start in this case because it'll be easier to type out.

First goto the folder Soarer Convertor\tools and extract the windows.zip
Then you should get the folder named soarer_sctools_v1.0_windows which inside will be a bunch of exe files
Type edit enviromental variables into start menu, then in the top box, select the line starting with PATH
Then click edit, then new, then add the path to the Soarer_Converter_v1.0/tools folder, click ok and then apply.

type scas into command prompt, you should get this.

Code: Select all

usage: scas <text_config> [<text_config> ...] <binary_config>
if you get that then all you need to do is flash your layout by using the command prompt and typing

Code: Select all

scas your_keymap.sc your_keymap.scb
then

Code: Select all

scwr your_keymap.scb
obviously replace "your_keymap" to whatever yours is.

I mean step for step that's exactly what i did, so i hope yours works

twasa

02 Jan 2019, 17:53

Thanks for the detailed reply. Adding the Soarer tools folder to the path, allows one to address the contents of the folder from any other folder. I'm ok with the command line and don't really need that to execute the Soarer tools.

I was under the impression that there is a default key mapping when one flashes the converter onto the pro micro and one only needs one if you'd like to reassign keys etc. Am I mistaken?

User avatar
St0ckz

02 Jan 2019, 17:58

twasa wrote: Thanks for the detailed reply. Adding the Soarer tools folder to the path, allows one to address the contents of the folder from any other folder. I'm ok with the command line and don't really need that to execute the Soarer tools.

I was under the impression that there is a default key mapping when one flashes the converter onto the pro micro and one only needs one if you'd like to reassign keys etc. Am I mistaken?
That was not my experience. I thought converting a board with a well documented process such as soarers would pretty straightforward, like remapping any qmk board for example.

if you have an .sc or .scb file, do the last steps and your board should work. How to edit said file is beyond my knowledge I'm afraid, but when i flashed soarer's hex onto my pro micro it did not have a default mapping of any kind.

User avatar
Muirium
µ

02 Jan 2019, 18:01

That's not how Soarer's *converter* works at all. There is a default mapping. It simply 1:1 translates the original keyboard's output into USB keyboard codes.

Soarer's *controller* meanwhile, does indeed need a map specified from scratch. Similar name, very different function. The controller has to drive a matrix. In this case, there is no clear sensible default. You have to define the matrix yourself.

User avatar
St0ckz

02 Jan 2019, 18:07

Muirium wrote: That's not how Soarer's *converter* works at all. There is a default mapping. It simply 1:1 translates the original keyboard's output into USB keyboard codes.

Soarer's *controller* meanwhile, does indeed need a map specified from scratch. Similar name, very different function. The controller has to drive a matrix. In this case, there is no clear sensible default. You have to define the matrix yourself.
Perhaps I should have prefaced it with, "I have no idea what I'm doing but I got it to work so there's that" :lol:

twasa

02 Jan 2019, 18:18

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

Post Reply

Return to “Workshop”