SparkFun Forums 

Where electronics enthusiasts find answers.

Your source for all things Atmel.
By saramakos
#116814
Hi - I have a few questions about them...

* Are ALL the code samples 100% compatible with a 328p, and are there many/any changes needed?
* I have got up to the AVR GCC Compiling one, but I don't have a Max232, I have the Sparkfun FTDI Basic board. The echo test by wiring TX <-> RX works fine. Can this be wired up with just TX to Pin 3, RX to Pin 2 for the next step, and does the earth and +5V on the FTDI board need to be connected to the breadboards GND and +5 rails?

I have tried wiring it as close to the tutorials as possible for Tutorial 5, but I get no output at all on the terminal.

I hope these aren't questions you hear 100 times :)

Stuart
By stevech
#116872
saramakos wrote:Hi - I have a few questions about them...

* Are ALL the code samples 100% compatible with a 328p, and are there many/any changes needed?
Bare chip or a module you purchased?
By saramakos
#116876
Just a straight ATMega 328p chip in a breadboard.
Was a factory default configuration until I followed the exercise to set the fuse bits for the 16Mhz crystal.
That one worked perfectly thankfully!
By qema
#116978
saramakos wrote: * Are ALL the code samples 100% compatible with a 328p, and are there many/any changes needed?
Different AVR families(for lack of a better term) use different registers. ATmega8 and ATmega32 code is comparable with each other. The ATmega88, ATmega168 and ATmega328 code is also compatible. The ATmega8 and the ATmega88/168/328 have the same pin layout but they use different registers so the code is not compatible (but very similar).

The ATmega88/168/328 family is only about a year old so if there is a date on the code is older a year or 2 old its most likely a mega8.
saramakos wrote: * I have got up to the AVR GCC Compiling one, but I don't have a Max232, I have the Sparkfun FTDI Basic board. The echo test by wiring TX <-> RX works fine. Can this be wired up with just TX to Pin 3, RX to Pin 2 for the next step, and does the earth and +5V on the FTDI board need to be connected to the breadboards GND and +5 rails?
When you deal with serial you need to cross the wires, so pin 2(RX) on the AVR needs to be hooked up to the TX pin on the FTDI board, and pin 3(TX) on the AVR needs to be hooked up to the (RX) on the FTDI.

When ever you have any communication between 2 devices you need to connect their GNDs together.

Hooking up TX(AVR) <--> RX(FTDI), RX(AVR) <--> TX(FTDI) and GND(AVR) <--> GND (FTDI) and things should work.

The schematic looks like the FTDI is getting its power from the USB port so you should leave the not connected, or connect the +5V to the AVR and disconnect whatever you are using to power your AVR.
By saramakos
#116981
Thankyou for clarifying that for me!
The tutorials are 168 compatible so I should be fine on that front I guess.
I will have another look at my serial connection tonight and hopefully get some talking happening!
Thanks again.

Stuart