New and need help. Kickstarter Picade board problems

Hi guys,

new onboard here, so plz be gentle ;-).

I have a big picade kickstarter edition that I bought second hand about two years ago. I had it running pretty fine back then with a pi1b. Life made me put the thing away for some time.
Now I’m trying to get it going with a Pi3 and I’m hitting walls.

summary:

now it seems my board is fried or bricked?

Joy up will just not register anymore. There’s a fine 5V on the joy up line and the switch shorts it fine, but no keys are pressed and TX will not flash. Also not when I short the connections on the picade board itself.
All other joymoves and buttons except 7 and 8 work fine.

So what did I do wrong? I feel the firmware broke it, but I have no clue how to restore it.
edit: I have picade board rev 9…

Any help is greatly appreciated.

Regards, Ralph.

edit2: moved to the right board.

what colour is your PCB? the current firmware (and alternatives) are only suitable for the non-Kickstarter Picade PCB, which I believe are all blue… or at least I would suspect yours, if red, might be the earlier revision.

If so, you may have to reflash a suitable firmware. I don’t know myself what a rev9 board is, nor whether the above is applicable to it, but that is something a @gadgetoid ‘bat sign’ should resolve!

Hi, tx for reply. My board is actually purple, so exactly between red and blue ;-).

If there is any way to flash back the correct firmware, or if I can reroute the cabling and edit the keymaps or the python program, I’d love to receive a finger pointing in any of those directions.

No rush, weekend is multiple days away ^^.

I am fairly certain that they are only red and blue ones out there could you post a photo

@gadgetoid is this a prototype one that has been shipped accidentally

purple boards, I’m told, are indeed the Kickstarter version. They have a different pinout, so yes, latest firmware are incompatible.

I have zero information related to the software flashing for these boards, having not even seen or held one first hand. Your best bet is to email support@pimoroni.com and hope someone can remember enough about those to walk you through the steps required to get back on track!

You want to be flashing the original 2015 firmware, which you can find here: https://github.com/pimoroni/Picade-Sketch/tree/master/update

The actual update file you want is: https://github.com/pimoroni/Picade-Sketch/blob/master/update/other/picade_original.hex

So you should run:

./update other/picade_original.hex

Almost… :(

Did that, updater did some flashing but errored out at 87%. (Apologize sincerely for losing the exact error message in panic.)
Retried the update, but that didn’t start, told me to press reset on the picade.
Resetted picade, didn’t help, retried, rebooted and retried but it’s just stuck now.

Checking for required packages…
avrdude is already installed
python-serial is already installed

Flashing firmware: other/picade_original.hex

Updating should continue automatically.
If not, press reset on your Picade.

Any way to brute force it?
(Alternatively I’ll be quick to order your lost stock of the Picade HAT).

edit: while noobing myself into the procedures I notice there is no /dev/ttyACM0 listed in my Pi. My guess is this should be there right after boot? And it not being there means byebye?

Hmm, with the Picade plugged in, what do you see when you:

lsusb

And:

ls /dev/tty*

Then it shows this:

pi@retropie:~ lsusb Bus 001 Device 005: ID 046d:c52b Logitech, Inc. Unifying Receiver Bus 001 Device 004: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub pi@retropie:~ ls /dev/tty*
/dev/tty /dev/tty15 /dev/tty22 /dev/tty3 /dev/tty37 /dev/tty44 /dev/tty51 /dev/tty59 /dev/tty9
/dev/tty0 /dev/tty16 /dev/tty23 /dev/tty30 /dev/tty38 /dev/tty45 /dev/tty52 /dev/tty6 /dev/ttyAMA0
/dev/tty1 /dev/tty17 /dev/tty24 /dev/tty31 /dev/tty39 /dev/tty46 /dev/tty53 /dev/tty60 /dev/ttyprintk
/dev/tty10 /dev/tty18 /dev/tty25 /dev/tty32 /dev/tty4 /dev/tty47 /dev/tty54 /dev/tty61
/dev/tty11 /dev/tty19 /dev/tty26 /dev/tty33 /dev/tty40 /dev/tty48 /dev/tty55 /dev/tty62
/dev/tty12 /dev/tty2 /dev/tty27 /dev/tty34 /dev/tty41 /dev/tty49 /dev/tty56 /dev/tty63
/dev/tty13 /dev/tty20 /dev/tty28 /dev/tty35 /dev/tty42 /dev/tty5 /dev/tty57 /dev/tty7
/dev/tty14 /dev/tty21 /dev/tty29 /dev/tty36 /dev/tty43 /dev/tty50 /dev/tty58 /dev/tty8
pi@retropie:~ $

If I unplug the Picade there’s no change.

Haha, I feel sorry for the board and its creators man.
Wondering who ordered that last Hat…

Hmm, zoiks! Do you have another USB cable to try, just as a sanity check? Duff cables have caught me out more than once.

Otherwise, it’s possible the bootloader could have been trounced. That’s actually not an unrecoverable error, but it’s not straightforward to fix.

You can wire the Pi directly to the 6-pin programming header and upload the code that way if you’re up for some fun. Although I’ll need to get a set up to match yours so I can:

a) Remember how the heck to do it, it’s been a while!
b) Guide you through the steps as I figure them out again :D

It’s not like I’ve been programming AVRs from Raspberry Pis for years or anything… http://pi.gadgetoid.com/article/programming-your-pico-piduino

1 Like

Haha, anyone not up for this kind of fun would definitely fail a sanity check.
Different cable didn’t fix it. Same device count after lsusb, and no /dev/ttyACM0 after ls /dev/tty*.

So I see the 6 ICSP pins and they look very disconnected.
Connect them where to my Pi3?
Am I correct in assuming that after it’s connected we go avrduding the picade_original.hex on there again?

No rush eh, your support is overly awesome!

I can vouch for the method described here (only tried 2 days ago on an Uno, as well as barebone ATmega):

You’d want to hook up the pin they missed to 5V, but other than that it should work using arvdude 6.1 as currently shipping with Raspbian/RetroPie, i.e no need to compile from source a more recent version, the linuxgpio programmer is functional in the version installed with apt.

That said, it would be best for @gadgetoid to outline what you would need to do when you have the toolchain ready to go.

Cool stuff. I think I have everything in house. I could hook it up like in the examples.
Just need to know that it’s the whole original firmware file that I’m going to flash and not some specific bootloader file that I’m missing.
If that is so, I’ll get started right after work tonight.

Thanks a bunch!

I successfully programming one by hooking it up to 3.3v where 5v would normally go. This should be in the AVRs voltage input range, and will keep the JTAG header running at safe voltage for your Pi.

I had to press and hold the reset button in order to program, however, that may or may not be a symptom of my crusty old green prototype board.

You will need female to female jumper jerky to connect the header up to your Pi.

The header on the board will be pinned out thusly:

MISO   [ ] [ ]  5V <-- Use only 3.3v!
SCK    [ ] [ ]  MOSI
RESET  [ ] [ ]  GND

I’m not sure what orientation its in, but the ground pin will have 4 little pips coming off its solder pad that connect to the ground plain, and the power pin will have a fatter trace running from it.

On my board, with the PICADE text orientated properly the GND and 3.3v are bottom left and bottom right.

You will need to enable SPI on your Pi, then connect the Picade to: https://pinout.xyz/pinout/spi

MOSI -> SPI0 MOSI
MISO -> SPI0 MISO
SCLK -> SPI0 SCLK
RESET -> SPI0 CE0
VCC -> 3.3v
GND -> GND

You then use the linuxspi programmer to flash the board, running avrdude like so:

sudo avrdude -c linuxspi -p m32u4 -P /dev/spidev0.0 -U flash:w:picade_original.hex

You might want to replace the bootloader with the original Leonardo (compatible with the ATMega32u4 on the Picade) bootloader, which you can grab with:

wget https://raw.githubusercontent.com/arduino/Arduino/master/hardware/arduino/avr/bootloader s/caterina/Caterina-Leonardo.hex

And flash with:

sudo avrdude -c linuxspi -p m32u4 -P /dev/spidev0.0 -U flash:w:Caterina-Leonardo.hex

If you see:

pi@zerowstem:~/picade-sketch/update/other $ sudo avrdude -c linuxspi -p m32u4 -P /dev/spidev0.0 -U flash:w:picade_original.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

Hold down RESET on the Picade PCB and that should change to:

pi@zerowstem:~/picade-sketch/update/other $ sudo avrdude -c linuxspi -p m32u4 -P /dev/spidev0.0 -U flash:w:picade_original.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9587
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "picade_original.hex"
avrdude: input file picade_original.hex auto detected as Intel Hex
avrdude: writing flash (6282 bytes):

Writing | ################################################## | 100% 1.64s

avrdude: 6282 bytes of flash written
avrdude: verifying flash memory against picade_original.hex:
avrdude: load data flash data from input file picade_original.hex:
avrdude: input file picade_original.hex auto detected as Intel Hex
avrdude: input file picade_original.hex contains 6282 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.42s

avrdude: verifying ...
avrdude: 6282 bytes of flash verified

avrdude: safemode: Fuses OK (E:CB, H:D8, L:FF)

avrdude done.  Thank you.

Oh Jolly! I have some life in it again! And it was fun fun fun ye…

Every flash worked and all buttons react, except… the joystick?

So I did the picade_original.hex -> got keypresses at most buttons.
Tried the Catarina thing (fixed space typo) -> flashed fine but got no TX’s going,
so I redid the picade_original.hex.

Now something’s still wonky. The stick won’t react. No TX flashing on the Picade when I move the stick or ground the pins on the board. (Some buttons behave the same.)
But the voltages on the Joy connection block don’t make sense. Joy up gives 4.93V which is fine, but the other 3 (DLR) give only 1.93 volt?? (disconnected the wires to be sure)
Same voltages when I power the picade seperately with a 2A supply.
So I’m doubting if the firmware is actually the correct one, can that be?

I’ll try to go through em all though, and let ya know. I know where to find em now, and this flashing doesn’t get old yet ;-)

Thanks guys, even though I’m not yet retro-pie-ing, the education is priceless and your support is touching ^^.

I enjoy any opportunity to impart the minutiae of my knowledge onto anyone who’ll listen. Specially if they’re as eager as you! It’s a good way to remember how the heck to do things, too!

The weird voltages suggest that the pull-up resistors on some of those pins aren’t being asserted, which points to a firmware issue- possibly that it’s not the right firmware. I’m not aware of any other firmware for the Kickstarter Picade PCB so it looks like I might have to dig up the schematic and see if I can’t port the shiny new firmware to the older board.

IIRC the older board is actually slightly better for modding/custom builds since it includes a whole bank of extra IO so it would be worth hanging onto. It otherwise seems fine!

In the mean time, if you want another adventure you could try getting this to compile and flash with Arduino-mk: https://github.com/pimoroni/picade/blob/master/software/picade-controller-arduino/picade-controller.c

Sure you could port it into the Arduino IDE and export a hex to flash with avrdude, but where’s the fun in that :D

####Update:

I verified the pinout from the C file against, of all things, a good photo of the PCB since I don’t have one with me, looks like:

JOYSTICK

U   PB0
D   PB1
L   PB2
R   PB3

BUTTONS

#1  PF7
#2  PF6
#3  PF5
#4  PF4
#5  PF1
#6  PF0

GPIO

#1  PD6
#2  PD7
#3  PB4
#4  PB5
#5  PB6
#6  PC6

UTILITY

Start  PD0
Select PD1
Enter  PD2
Esc    PD3

You should be able to hack up picade-controller.c to test all of the buttons. Set each one to input pullup and trigger some output over serial when they change state :D That should give you a minimal sanity check of the buttons.

To find these I used the Atmega32u4 datasheet: http://www.atmel.com/Images/Atmel-7766-8-bit-AVR-ATmega16U4-32U4_Datasheet.pdf

Note: They can’t be easily translated into Arduino Leonardo pin numbers, because some of the pin choices clash with functions on the Leonardo board. You’ll see that picade-controller.c uses the PORT registers and just sets them bit-by-bit.

Once again cool stuff man, thanks!
Will definitely get onto it the coming days. (Work and kids perrmitting obv.) The extra IO on this board is what kept me from just getting another picade board, since I actually have that picade with the 8 buttons on top.
Actually, I did order your last Picade HAT just to be sure ;-). It will save me from further troubleshooting the sound issue I initially had.

Jumping here as I need a little help with the exact same issue.

I have the original KS edition and to fix a perceived audio problem I blindly update the firmware to the no_headphones version.

Strangle thing is that it worked, with the exception of the UP Joystick - very strange. So I unscrewed the controller fascia and reconnected all the U,D,L,R and ground wires. It still didn’t work so I disconnected the UP wire and attached it elsewhere, still no joy (LOL) so I then used a small wire to ground each position connector on the board, each one caused the board’s green LED to light up with the exception if the UP connector.

Then I read this thread, realised my mistake, put the original FW back on the board and I’m left with none of the joystick ports working!

Is there another version of the original firmware that might fix it?

Thanks

edit: I say original, but I remember there being some delays due to screen sizes on KS this is a purple Rev.9 board

I’ll see if I can dig up an original PCB to dump the firmware. The hex seems to have got lost in the shifting sands of time. I don’t see any reason why I couldn’t port the newer firmware to the older PCB, too, it seems only right.

That would be really appreciated