DuPAL: Difference between revisions

From Proghq
Jump to navigation Jump to search
No edit summary
Line 18: Line 18:
Pre-compiled hex files: https://proghq.org/media/dupal/
Pre-compiled hex files: https://proghq.org/media/dupal/


  sudo apt-get install -y avrdude
  sudo apt-get install -y avrdude minicom




Line 44: Line 44:
The green blinky might stop. Hit the reset button and it should blink again
The green blinky might stop. Hit the reset button and it should blink again


Start up a serial port at 57600 (ex: screen /dev/ttyUSB0 115200). Hit "reset" and you should see:
Start up a serial port at 57600 baud using your favorite terminal emulator such as:
 
minicom -b 57600 -D /dev/ttyUSB0
 
Hit "reset" and you should see:


(blinky for a few seconds)
(blinky for a few seconds)
Line 54: Line 58:
  REMOTE_CONTROL_ENABLED
  REMOTE_CONTROL_ENABLED


If you see this, congrats! your DuPAL is flashed and ready to go
If you see this, congrats! your DuPAL is flashed and ready to go! Press ^A and then x to exit minicom


A healthy board should have a steady red power LED and a brief green blink at power on
A healthy board should have a steady red power LED and a brief green blink at power on

Revision as of 21:27, 21 May 2022

Quick start

You will need:

  • Ubuntu 20.04
  • Assembled DuPAL 2.0 w/ 20 pin ZIF installed
    • ATMEGA328P blank / in any state
  • DuPAL power supply and USB serial
  • avrdude compatible programmer
    • I used avrispmkII
  • PAL16L8
  • Optional: tool to flash PAL16L8
    • TL866 won't work :(

Quick flash

For more information see the main page

Pre-compiled hex files: https://proghq.org/media/dupal/

sudo apt-get install -y avrdude minicom


ISP connection:

 * Pin 1 (red stripe in cable) towards crystal
 * Notch faces towards ATMEGA

You need an avrdude compatible programmer. To see the list of compatible programmers type

avrdude -c help

Once you know the flag you need, here's an example assuming avrispmkII:

avrdude -v -c avrispmkII -P usb -p atmega328p -e -u \
    -U efuse:w:0xFD:m \
    -U hfuse:w:0xDE:m \
    -U lfuse:w:0xFF:m \
    -U flash:w:optiboot_atmega328.hex

You should see a green blinky LED

avrdude -v -c avrispmkII -P usb -p atmega328p -u -D \
    -U flash:w:dupal_v0.1.2.hex

The green blinky might stop. Hit the reset button and it should blink again

Start up a serial port at 57600 baud using your favorite terminal emulator such as:

minicom -b 57600 -D /dev/ttyUSB0

Hit "reset" and you should see:

(blinky for a few seconds)

Then:

DuPAL - 0.1.2

REMOTE_CONTROL_ENABLED

If you see this, congrats! your DuPAL is flashed and ready to go! Press ^A and then x to exit minicom

A healthy board should have a steady red power LED and a brief green blink at power on

Quick test

For more information see the main page

Building

Optiboot

# https://github.com/Optiboot/optiboot

# 328P uses 115200?
# a few use 57600 but not the one we need :(
# wget https://github.com/Optiboot/optiboot/releases/download/v8.0/Optiboot-8.0.zip

git clone https://github.com/Optiboot/optiboot.git
cd optiboot
git checkout -b v8.0 v8.0
cd bootloaders/optiboot
make atmega328 AVR_FREQ=20000000L LED_START_FLASHES=8 BAUD_RATE=57600
# sha1sum optiboot_atmega328.hex
# 8a16ce8d98d7bf002c54c7aa911bfd124d9e1961  optiboot_atmega328.hex

Flash optiboot. Example CLI to use ISP header, but can also put into tl866 etc

Sample command line:

Sample output

Originally I tried using BP Microsystems but didn't work (fuses not set right?). I then flashed using avrdude / header and worked (green LED blinking).

TODO: dump end flash so can program using bp

cd DuPAL_Firmware
make
make program