TRW-24g to RS232 using ATMEL MCU

Hi,

I’ve bought from sparkfun the TRW-24g (two pieces).

I want to connect the TRW-24g to serial port and communicate via RS232.

I don’t know how to build the MCU (the PCB that connects the TRW-24g to serial connector DB9).

I want to do it using ATMEL (atmega8/atmega88)

Does anyone can guide me with the MCU schematics?

I’ve seem some posts here in the forum about the voltage needed for the TRW (3.3V). which is different from the one the ATMEL needs (5V).

Why can’t I just use a voltage regulator to change the voltage as I wish to?

am I right, or is there something hidden I’m missing?..

Does anyone have the source code for the ATMEL?

Tal.

I want to connect the TRW-24g to serial port and communicate via RS232.

These modules will not communicate over RS232 lines because they interface via an SPI-type of interface, RS232 is esentially a UART. If you want to hook it to a serial port, you will have to put a microcontroller between the computer and the TRW-24g.

I don’t know how to build the MCU (the PCB that connects the TRW-24g to serial connector DB9).

Get a breadboard and start from there. There are all kinds of places you can search on the web about beginning building digital logic.

I want to do it using ATMEL (atmega8/atmega88). Does anyone can guide me with the MCU schematics?

You can certainly do that. My suggestion is to find an Atmel breakout board here at SparkFun and buy it. Post in the AVR forums for more help on programming them.

I’ve seem some posts here in the forum about the voltage needed for the TRW (3.3V). which is different from the one the ATMEL needs (5V).

Why can’t I just use a voltage regulator to change the voltage as I wish to?

am I right, or is there something hidden I’m missing?..

The main problem is that the TRW's pins (to my knowledge) are not 5V tolerant. Therefore, you will have to do some level shifting, either through a dedicated chip or use a resistor-based voltage divider. You can use a voltage regulator to power the TRW, and I would recommend using an LDO regulator since the voltages are so close. Also, have you checked to make sure the Atmel chips can't run on 3.3V?

Does anyone have the source code for the ATMEL?

I know several people have written some interface code, but all my code was for the MiRF-v2 module (which is based on the 24L01 chip rather than the 2401 chip that the TRW is based on).

First of all thanks for your answer.

I’m using ATMEL microcontrollers for a long time now, and I have a home made programmer.

On that case, I need the schematics inorder to build the PCB (I own a breadboard and all).

I’m wonrking with AtMega ATMELs that all works with 5V.

Is there a problem that they will get different voltage?

What is a LDO?

I need the schematics inorder to build the PCB (I own a breadboard and all).

I don't really know what you mean by this. If you're building a PCB that is specific to your application, then chances are nobody will have it. However, if you're basically just trying to make a board that is like a development board, then SparkFun usually posts their schematics for their boards and you can look at theirs. You can use Eagle Light (a free download) to make your own schematics and PCBs. There are tons of PCB fab companies out there that will make your board for you, so you should do a web search and check them out to see who gives you the best deal.

I’m wonrking with AtMega ATMELs that all works with 5V.

Is there a problem that they will get different voltage?

I'm pretty sure that the TRW can't handle 5 volts on its input pins. Therefore, you will have to somehow drop the voltage that comes out of the AVR that goes into the TRW. This can be done with a dedicated chip (I forget the chips now, but there was a discussion not too long ago on this topic recently...try a search), by a resistor-based voltage divider ([http://en.wikipedia.org/wiki/Voltage_divider](http://en.wikipedia.org/wiki/Voltage_divider)), or by a few other means that are more complicated.

What is a LDO?

LDO stands for low-dropout regulator. These are used when the input voltage to the regulator is relatively close to the desired output voltage. Normal linear regulators require the input voltage to be around 1.5 to 2 volts higher than the output voltage, which doesn't give you much of any wiggle room when going from 5V to 3.3V. Check out [http://en.wikipedia.org/wiki/Low_dropout_regulator](http://en.wikipedia.org/wiki/Low_dropout_regulator) for more information.

http://www.avrfreaks.net/index.php?name … light=4050