Giter Site home page Giter Site logo

Comments (24)

itsnoteasy avatar itsnoteasy commented on August 21, 2024 4

I was having difficulty entering the bootloader and i'd like to note the docs are wrong. the correct procedure is:
Enter bootloader mode

Push and hold BOOT SW
Plug into USB cable
Release BOOT SW
make plaid:flash
Push and release RESET SW

from plaid.

BenRoe avatar BenRoe commented on August 21, 2024 2

Ok, i can give you some tips, but can't explain the whole process.
You need a ISP Flasher like the usbtinyisp (cheap on ebay or aliexpress).
Connect the usbtinyisp via usb to the pc.
Connect usbtinyisp to plaid via isp header.
Use avrdudess (gui for avrdude) on windows. It's easier.

Use yellow marked settings, but replace it for the following settings.
L (LFUSE): 0xF7
H (HFUSE): 0xD0
E (EFUSE): 0x04
avrdudess

from plaid.

Daveyr avatar Daveyr commented on August 21, 2024 1

After much trial and error I think I've worked it out. I wrote a blog post here but the summary is below.

First upload the standard avrisp example sketch to the Arduino Nano. Note, the default baud rate is 19200.
Using the method described above to make the hex file, I entered the following in a terminal on a pc connected to the Arduino, in turn connected to the ISP headers on the keyboard.

avrdude -u -c avrisp -p m328p -P /dev/ttyUSB0 -b 19200 -U flash:w:"plaid_default.hex":a -U lfuse:w:0xF7:m -U hfuse:w:0xD0:m -U efuse:w:0xfc:m

Notes.

  1. When burning the bootloader you need a 10nF capacitor across GND and RST pins on the Arduino Nano (no need for other Arduino types)
  2. The programmer is actually avrisp rather than arduino
  3. The efuse setting in the plaid firmware repo is wrong; it should be 0xfc
  4. I had to disconnect the Arduino from the keyboard in order for it to be properly detected

from plaid.

MrCrazyUkrainian avatar MrCrazyUkrainian commented on August 21, 2024 1

Update on my troubles. They are now resolved.
Solder USB connector carefully and check multiple times that all the pins have continuity to the corresponding components, as in my case one of the data lines wasn’t soldered properly (solder pad split) and that was the cause of everything.
After plonking a bit of solder onto that problematic joint everything works fine.
Admittedly it took me and MechBoards UK support staff way too much time to figure out.
As of now it works, I just need to figure out how to solder all the switches so that that are all properly aligned as I bought 3 pin ones (and I am a bit of a perfectionist) :/

from plaid.

hsgw avatar hsgw commented on August 21, 2024

Hi,

LED is not turn on when connected.

Could you check soldering and the directions of component again?

from plaid.

miguelangelramirez avatar miguelangelramirez commented on August 21, 2024

Double checked the soldering, thought I saw a bridge on the capacitor but there was no bridge at all
plaid_IMG_8919

from plaid.

BenRoe avatar BenRoe commented on August 21, 2024

Are you using the ISP header? Which device you use, to burn the bootloader on the chip?
Check also baerwolf/USBaspLoader#19

from plaid.

miguelangelramirez avatar miguelangelramirez commented on August 21, 2024

I'm plugging the keyboard to my computer through USB, should I use the ISP header to burn the bootloader?? I could also use my other Arduino Uno to program it, maybe will try that tonight.

from plaid.

BenRoe avatar BenRoe commented on August 21, 2024

Do you bought the kit via the original GB or keycapsss.com?
If yes, the bootloader is already burned and you only have to follow the firmware steps.

from plaid.

miguelangelramirez avatar miguelangelramirez commented on August 21, 2024

I ordered my PCB from jlcpcb since I couldn't get a kit, I know I suck.

from plaid.

marsicplusplus avatar marsicplusplus commented on August 21, 2024

I've bought the kit from the GB, but even after another check to both soldering and schematics my pc (both windows and Linux) won't notice that a new device has been connected to it.

Could it be that the atmega is not working properly?
How do I check that?

from plaid.

marsicplusplus avatar marsicplusplus commented on August 21, 2024

Wow, thank you very much, this was way more than I expected from you!

I'll try this as soon as possible, thanks!

from plaid.

miguelangelramirez avatar miguelangelramirez commented on August 21, 2024

Ok, i can give you some tips, but can't explain the whole process.
You need a ISP Flasher like the usbtinyisp (cheap on ebay or aliexpress).
Connect the usbtinyisp via usb to the pc.
Connect usbtinyisp to plaid via isp header.
Use avrdudess (gui for avrdude) on windows. It's easier.

Use yellow marked settings, but replace it for the following settings.
L (LFUSE): 0xF7
H (HFUSE): 0xD0
E (EFUSE): 0x04
avrdudess

That is awesome!! sadly they take some time to delivery and I'm moving to LA soon :(. I'll order one when I get my new address, but still try to load it with my Arduino Uno/breadboard...I think I have all the parts just laying round.

Thanks bro!

from plaid.

marsicplusplus avatar marsicplusplus commented on August 21, 2024

I've tried flashing the bootloader with the USBTiny programmer with no luck at all.

The most weird thing is that avrdude is successful in writing the bootloader even if the board isn't officially in DFU mode (success either after or before pressing the buttons).

from plaid.

itsnoteasy avatar itsnoteasy commented on August 21, 2024

here's how I got it to work.
1, open plaid_default.hex in text editor, remove last line :00000001FF
2, append usbasp bootloader on to end
3, flash using teensy 2.0 with qmk isp flashing guide
avrdude -c avrisp -p m328p -P /dev/ttyACM0 -b19200 -U flash:w:plaid_default.hex
avrdude -c usbasp -b19200 -p m328p
one efuse didn't write but it wasn't important(low voltage protection).
then make plaid:default:program to program normally over usb.
the issue seems to be that an incorrect baud rate was used.

from plaid.

BenRoe avatar BenRoe commented on August 21, 2024

If you use a newer qmk firmware, then use make plaid:default:flash and not plaid:default:program.

from plaid.

denisinvader avatar denisinvader commented on August 21, 2024

I was having difficulty entering the bootloader and i'd like to note the docs are wrong. the correct procedure is:
Enter bootloader mode

Push and hold BOOT SW
Plug into USB cable
Release BOOT SW
make plaid:flash
Push and release RESET SW

This worked for my kit ordered from mechboard (preflashed I guess)

from plaid.

Daveyr avatar Daveyr commented on August 21, 2024

@itsnoteasy, would you mind elaborating? Are you using the main.hex file from the plaid fork of the USBaspLoader repository? In step 2, which file contents do you append to the bottom of it? I'm trying to use avrdudess in Linux (using mono), with an Arduino nano as a programmer but not having any success. My settings are below but I think the main issue is the hex file.
image

from plaid.

itsnoteasy avatar itsnoteasy commented on August 21, 2024

that's correct, step 2 is copy paste the ascii from this file https://github.com/hsgw/USBaspLoader/blob/plaid/firmware/main.hex
I don't know what the error is with your setup but it could be using the nano for programming isp. a teensy 2.0 would have a lower learning curve.

from plaid.

Daveyr avatar Daveyr commented on August 21, 2024

Thanks for the clarification. So I combine the hex file generated from qmk (mine is called dm9records_plaid_default.hex) with the main.hex from the file you reference above into one file (removing the last line from the first file - contains :00000001FF)?
I've named this plaid_bootloader.hex and managed to upload it using an arduino nano using the following command:

avrdude -u -c arduino -p m328p -P /dev/ttyUSB0 -b 115200 -U flash:w:"/home/ubuntu/Documents/projects/keyboards/plaid/bootloader/plaid_bootloader.hex":a -U lfuse:w:0xF7:m -U hfuse:w:0xD0:m -U efuse:w:0x04:m

However, it complains about the efuse setting.

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0x04:
avrdude: load data efuse data from input file 0x04:
avrdude: input file 0x04 contains 1 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0xfc != 0x04
avrdude: verification error; content mismatch

avrdude done. Thank you.

Incidentally, this is exactly the same error I find when I burn the bootloader using Arduino software. I created a new board definition with the fuse settings you showed above and the error message was almost identical.

It is also the same error I get when I take the plaid firmware repo and run:

make
make flash
make fuse

When I remove all the settings relating to fuses then the flash seems to go through fine and my red led on the keyboard lights up. However, the board isn't recognised. Either way, when I run avrdude -c arduino -p m328p it says that no such device is connected. Any ideas?

from plaid.

MrCrazyUkrainian avatar MrCrazyUkrainian commented on August 21, 2024

Hi all!
I am having the same problem as originally described in this thread: I soldered everything seemingly correctly and yet the keyboard isn't detected by my WIndows PC in the device manager. It just lists it as an unrecognized USB device. I followed the guide and installed the libusBK driver and was using button press combinations from the OG guide and what was reccomended by @denisinvader , and yet it stil isn't recognized. Does anyone of you have any ideas what I should do?
I bought the kit from mechboards.co.uk and it is supposed to have firmware preflashed onto the ATmega ship.

from plaid.

chief-teep avatar chief-teep commented on August 21, 2024

Was the board in bootloader mode when you installed libusbk in zadig? It should show up as "usbasp" for the device if done correctly.

I made the mistake of installing libusbk as the device driver instead of the bootloader and had the same issue as you did.

Link to the QMK zadig guide

from plaid.

chief-teep avatar chief-teep commented on August 21, 2024

Glad you got it sorted! Don't feel too bad about it taking so long to figure out, I flashed a keymap to my plaid using the newest qmk version and it was bricked for 2 months before I figured out that I needed to use an older release -_-

from plaid.

Ardakilic avatar Ardakilic commented on August 21, 2024

Late to the party. I could not program the chip with USB ISP programmer, and I ended up using a Raspberry Pi instead. The All of my programmers, although they showed uploaded successfully (tried on macOS), did not apparently upload the bootloader to my cheap atmega328p.

The issue for me was both for Plaid and Lumberjack, which apparently is quite similar in terms of technicality.

from plaid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.