I have been successfully using Matt Hertels fantastic DMX transceiver software for quite a while now on numerous Arduinos, but now I want to put it onto a Mighty1284 (atmel1284)... it doesnt output any serial and I think its something to do with the Byte address names that are used that point to registers, I have looked at the library CPP & H files till my eyes bled and cant spot anything wrong, so I am guessing there must be a file somewhere in the Arduino files that equates the Byte names to a physical register address... Can anyone tell me where it is ??
Also does the IDE know to use a different set of registers when a different board is selected from menu ?
1280 has a lot more ports than a 1284 (100 pin part vs 44 pin part in TQFPs).
1280 has 4 serial ports, 1284 has 2.
I haven't dug into the other stuff. Do you have the mighty1284 core files installed?
It looks to me as though the 1284 names are the same as 1280/2560 names, so the current code SHOULD be working.
Are you sure you're connected to the correct serial pins? Both the 1280 and 1284 have multiple serial ports, and the DMX code as the ability to use either usart0 or usart1. It should be covered by this code in DMXSerial.cpp:
#elif !defined(DMX_USE_PORT1) && defined(USART0_RX_vect)
// These definitions are used on ATmega1280 and ATmega2560 boards
// like the Arduino MEGA boards
#define UCSRnA UCSR0A
#define TXCn TXC0
:
#elif defined(DMX_USE_PORT1) || defined(USART1_RX_vect)
// These definitions are used for using serial port 1
// on ATmega32U4 boards like Arduino Leonardo, Esplora
// You can use it on other boards with USART1 by enabling the DMX_USE_PORT1 port definition
#define UCSRnA UCSR1A
#define TXCn TXC1
#define UCSRnB UCSR1B
:
westfw:
It looks to me as though the 1284 names are the same as 1280/2560 names, so the current code SHOULD be working.
Are you sure you're connected to the correct serial pins? Both the 1280 and 1284 have multiple serial ports, and the DMX code as the ability to use either usart0 or usart1. It should be covered by this code in DMXSerial.cpp:
// These definitions are used on ATmega1280 and ATmega2560 boards
// like the Arduino MEGA boards #define UCSRnA UCSR0A #define TXCn TXC0
: #elif defined(DMX_USE_PORT1) || defined(USART1_RX_vect)
// These definitions are used for using serial port 1
// on ATmega32U4 boards like Arduino Leonardo, Esplora
// You can use it on other boards with USART1 by enabling the DMX_USE_PORT1 port definition #define UCSRnA UCSR1A #define TXCn TXC1 #define UCSRnB UCSR1B
:
There are multiple versions of the library [duh, imagine that!], and some show the lines above ....
I've checked out about a dozen libraries now for compatibility with 1284 chips (which is what I use in 90% of my projects now), and maybe half of them work ok, depending on specifically what the .h and .cpp files specify about the chips. Some are easily patched to work, others are a royale PITA to get to work.
Thanks for all your replies, lots to think about !!
I am also trying a atmega644 (half mem 1284) and I have looked at the data sheet for that and the register names are the same too, I ma using the right ports etc, I am very used to using Matt Hertels code, I was even trying to get it working with Atmega8_16's but with little success (this may be all the for the same reason - inexperience !)
ManicBug, yes I am using your mighty code, thank you