welcome: please sign in
location: Diff for "x0xb0x"
Differences between revisions 10 and 25 (spanning 15 versions)
Revision 10 as of 2011-06-01 02:25:26
Size: 2668
Editor: guest
Comment:
Revision 25 as of 2013-01-18 08:39:05
Size: 4344
Editor: guest
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
Line 4: Line 3:
Line 7: Line 5:
 * Mainboard: [[attachment:mainboard2.png|schematic image]] [[attachment:mainboard2.sch|schematic Eagle file]]
 * Ioboard: [[attachment:ioboard2.png|schematic image]] [[attachment:ioboard2.sch|schematic Eagle file]]
 * Mainboard: [[attachment:mainboard2.png|schematic image]]  [[attachment:mainboard2.sch|schematic Eagle file]]
 * Ioboard: [[attachment:ioboard2.png|schematic image]]  [[attachment:ioboard2.sch|schematic Eagle file]]
Line 11: Line 9:
A CPU Upgrade daughter board for the x0x was designed by textile on the x0x forums. it's a drop-in replacement, with an ATmega2561 processor and another spot for external EEPROM, plus a host of breakout pins for ADCs and such. Linked below are prototype bootloader and firmware code for the new chip (see note below on ISP programming). The bootloader is the same one used on the Arduino, so you can use that platform to program and load with. The only major difference between this firmware and the stock v1.05 is that the tempo knob is sampled rather than run on an interrupt. This was changed due to its lines not being connected to external interrupts on the new CPU.
Line 12: Line 11:
A CPU Upgrade daughter board for the x0x was designed by textile on the x0x forums. its a drop-in replacement, with an ATmega2561 processor and another spot for external EEPROM, plus a host of breakout pins for ADCs and such. Linked below are prototype bootloader and firmware code for the new chip. The bootloader is the same one used on the Arduino, Boston Android, and other platforms, so you might even be able to use those programs to load with. The only major difference between this firmware and the stock v1.05 is that the tempo knob is sampled rather than run on an interrupt. This was changed due to it's lines not being connected to external interrupts on the new CPU. To bootload the CPU, you will need to install AVRDUDE, which is a free piece of software, and have the the FTDI USB to serial drivers installed. Both of these things are similar to the old method. You must turn off your x0x, and power it back on in bootload mode. You then have 5 minutes to get your code loaded before it aborts. You upload your code by typing at the command line:
Line 14: Line 13:
To bootload the CPU, you will need to install AVRDUDE, which is a free piece of software, and have the the FTDI USB to serial drivers installed. Both of these things are similar to the old method. At the command line type: ''avrdude -p atmega2561 -c stk500v2 -P COM3 -b 57600 -e -U flash:w:x0xb0x2.hex''
Line 16: Line 15:
avrdude -p atmega2561 -c stk500v2 -P COM3 -b 57600 -e -U flash:w:x0xb0x.hex where COM3 is replaced with the COM port that your x0x shows up on. In this example, i have the new firmware (x0xb0x.hex) directly in my C:\ directory, which is also where i execute from. I found this works best, as directories with spaces sometimes confuse it. After the code is uploaded, the x0x will automatically reset itself, so you can just rotate the function knob and test out the new code.
Line 18: Line 17:
where COM3 is replaced with the COM port that your x0x shows up on. In this example, i have the new firmware (x0xb0x.hex) directly in my C:\ directory. I found this works best, as directories with spaces sometimes confuse it. I have yet to try out direct upload from ARDup, which is a graphical interface for doing the exact same thing. It also nicely installs the various drivers for you as well. Installing Arduino should do this, too.  * Bootloader: [[attachment:x0xb00t2.zip|zipped project]] [[attachment:x0xb00t2.hex|.hex file]]
 * Firmware: [[attachment:x0xb0x2.zip|zipped project]] [[attachment:x0xb0x2.hex|.hex file]]
Line 20: Line 20:
 * Bootloader: [[attachment:x0xb00t2.zip|zipped project]][[attachment:x0xb00t2.hex|.hex file]]
 * Firmware: [[attachment:x0xb0x2.zip|zipped project]][[attachment:x0xb0x2.hex|.hex file]]
Only 5 files changed in the firmware:
Line 23: Line 22:
Other details, like fuse settings and such, will appear here as they are generated.  * makefile - minor mod to change the output file name
 * x0xb0x2.hex - new compiled firmware
 * main.c - mostly timer and tempo fixes
 * main.h - ported internal registers
 * synth.h - ported external pin registers
Line 25: Line 28:
only 4 files changed in the firmware
makefile - minor mod to change the output file name
.hex - new compiled firmware
main.c - mostly timer and tempo fixes
main.h - ported internal registers
synth.h - ported external pin registers
The fuse settings for this new chip are as follows:

 * BOD level = 4.3V
 * JTAG enabled
 * ISP enabled
 * BOOTSZ = 4096 words (8k)
 * BOOTRST enabled
 * EESAVE enabled (no overwrite of internal EEPROM (saves last tempo, etc.))
 * SUT/CKSEL = full swing oscillator, 16CK + 65ms
 * LOCK BITS '''only''' set for SPM and LPM protection on bootload section

 * FUSE XTEN = 0xFC
 * FUSE HIGH = 0x90
 * FUSE LOW = 0xF7
 * FUSE BOOT = 0xCF

If you are interested in using the Arduino platform to program with, you will need to update your boards.txt file to include a new board, the x0x2561. This file is located in ''arduino-0022\hardware\arduino\boards.txt''. Rather than give a completely new file to replace yours with, which would overwrite any other updates made by the Arduino people to this file, merely open the file below and add its lines to your boards.txt file. When you look at the two files, it should be clear how to do this. Also included below is a test file, which should have LEDs respond to button presses in a random fashion.

 * Board file addition: [[attachment:x0x2561.txt]]
 * Test sketch: [[attachment:x0xtest.pde]]

===== ISP Programming the Atmega2561 =====
Due to Atmel's migration to the new PDI serial programming interface, the ISP programming pins do NOT go to the usual SPI pins. Instead, the PDO and PDI pins are used. If you are connecting to the x0x2561 upgrade board, here are the DIP header pins to connect to:

<<BR>>
||<tablestyle="width: 20%">'''ISP pin''' ||'''x0x pin''' ||
||1 ||11 ||
||2 ||40 ||
||3 ||8 ||
||4 ||10 ||
||5 ||9 ||
||6 ||20 ||

x0xb0x

Schematics

Here are revised versions of the x0xb0x schematics in a more readable form. A few part values were changed to match what was actually used in the build, but the components are exactly the same. They have been checked against the board files, and match as well as the original schematics, which means they have the same warnings and errors (except in a few noncritical cases). If anything seems amiss, please let us know.

CPU Upgrade

A CPU Upgrade daughter board for the x0x was designed by textile on the x0x forums. it's a drop-in replacement, with an ATmega2561 processor and another spot for external EEPROM, plus a host of breakout pins for ADCs and such. Linked below are prototype bootloader and firmware code for the new chip (see note below on ISP programming). The bootloader is the same one used on the Arduino, so you can use that platform to program and load with. The only major difference between this firmware and the stock v1.05 is that the tempo knob is sampled rather than run on an interrupt. This was changed due to its lines not being connected to external interrupts on the new CPU.

To bootload the CPU, you will need to install AVRDUDE, which is a free piece of software, and have the the FTDI USB to serial drivers installed. Both of these things are similar to the old method. You must turn off your x0x, and power it back on in bootload mode. You then have 5 minutes to get your code loaded before it aborts. You upload your code by typing at the command line:

avrdude -p atmega2561 -c stk500v2 -P COM3 -b 57600 -e -U flash:w:x0xb0x2.hex

where COM3 is replaced with the COM port that your x0x shows up on. In this example, i have the new firmware (x0xb0x.hex) directly in my C:\ directory, which is also where i execute from. I found this works best, as directories with spaces sometimes confuse it. After the code is uploaded, the x0x will automatically reset itself, so you can just rotate the function knob and test out the new code.

Only 5 files changed in the firmware:

  • makefile - minor mod to change the output file name
  • x0xb0x2.hex - new compiled firmware
  • main.c - mostly timer and tempo fixes
  • main.h - ported internal registers
  • synth.h - ported external pin registers

The fuse settings for this new chip are as follows:

  • BOD level = 4.3V
  • JTAG enabled
  • ISP enabled
  • BOOTSZ = 4096 words (8k)
  • BOOTRST enabled
  • EESAVE enabled (no overwrite of internal EEPROM (saves last tempo, etc.))
  • SUT/CKSEL = full swing oscillator, 16CK + 65ms
  • LOCK BITS only set for SPM and LPM protection on bootload section

  • FUSE XTEN = 0xFC
  • FUSE HIGH = 0x90
  • FUSE LOW = 0xF7
  • FUSE BOOT = 0xCF

If you are interested in using the Arduino platform to program with, you will need to update your boards.txt file to include a new board, the x0x2561. This file is located in arduino-0022\hardware\arduino\boards.txt. Rather than give a completely new file to replace yours with, which would overwrite any other updates made by the Arduino people to this file, merely open the file below and add its lines to your boards.txt file. When you look at the two files, it should be clear how to do this. Also included below is a test file, which should have LEDs respond to button presses in a random fashion.

ISP Programming the Atmega2561

Due to Atmel's migration to the new PDI serial programming interface, the ISP programming pins do NOT go to the usual SPI pins. Instead, the PDO and PDI pins are used. If you are connecting to the x0x2561 upgrade board, here are the DIP header pins to connect to:


ISP pin

x0x pin

1

11

2

40

3

8

4

10

5

9

6

20

x0xb0x (last edited 2019-04-20 20:20:25 by guest)