Interfacing different TTL/CMOS logic levels
I am working on a project where I am interfacing a Quasar QFM-RX1 chip with a Javelin Stamp microcontroller. I have direct coupling between the RX1 SerialDataOutputPin to a Uart input pin on the Javelin Stamp. The RX1 chip seems to use some strange logic voltage levels, so I dont know if i might have to create som interfacing hardware between the Javeling and the chip. I am feeding the RX1 chip with 5Vdc current from a MAX603 voltage regulator, with common ground with the Javelin.
I can send data to the Javelin over the radio, but I get weird characters instead of the ones I send. If I change baudrate, I get different characters.
Here are the specifications from the Quasar QFM-RX1 chip:
Supply current: 4.5 to 5.5 Vdc
High level output: 0.7 Vdc
Low level output: 0.3 Vdc
My question is, are those high/low levels on the RX1 directly interfaceable with the Javelin Stamp pin using Uart rx? Or, do I have to make som kind of logic levels conversion?
I can send data to the Javelin over the radio, but I get weird characters instead of the ones I send. If I change baudrate, I get different characters.
Here are the specifications from the Quasar QFM-RX1 chip:
Supply current: 4.5 to 5.5 Vdc
High level output: 0.7 Vdc
Low level output: 0.3 Vdc
My question is, are those high/low levels on the RX1 directly interfaceable with the Javelin Stamp pin using Uart rx? Or, do I have to make som kind of logic levels conversion?
Comments
If you look at the datasheet for the QFM-RX1, you'll see that the low and high logic voltages are the same as the SX processor used in most Stamps (including the Javelin) and are standard CMOS levels: low <= 0.3 x Vdd and high >= 0.7 x Vdd where Vdd is the supply voltage (5V here). The voltage levels are not your problem. Make sure the Baud is correct and the signal is not inverted with respect to what you're trying to transmit. You may be sending zero when the Javelin is assuming it will receive a one and vice-versa.
The transmitter is buildt on a PCB with a Basic Stamp 1, a pushbutton, a LED and a 3,3Vdc regulator chip for the QFM-TX1 transmitter plus a number of bypass and noise cancelling capacitors on both sides of every chips power lines. The BS1 and QFM-TX1 have common ground.
The receiver is buildt on a Stamp 1 Project Board with a Basic Stramp 1 (on board), a QFM-RX1 receiver plus bypass and noise cancelling capacitors on the power line for the QFM-RX1 receiver module. The BS1 and QFM-RX1 have common ground.
Data for the modules is found here: www.quasar.co.uk
I am now using a Basic Stamp 1 for the Radio Transmitter (TX) and a Basic Stamp 1 for the Radio Receiver (RX) as I wrote above. On the TX I send the character 65 with SEROUT 7, N1200, (65) when a pushbutton is depressed, and on the RX I am using SERIN 0, T1200, sData to read from the serial connection to the RXmodule. I then use DEBUG sData to show any incomming characters in the debug window.
The problem is that I am sending 65 but the debug window shows:
SDATA = 0
SDATA = 76
each time i push the button.
If I use SERIN 0, N1200, sData and DEBUG sData on the RX, the debug window shows:
SDATA = 255
SDATA = 121
Some of the times I push the button, this is shown instead:
SDATA = 255
SDATA = 255
Some other times it shows only:
SDATA = 121
Using N1200 on the TX and T1200 on the RX seems to get the most consistent results, but I am still not getting 65 when I am sending 65. I have tried all combinations of N1200/T1200 on both stamps, and the signal strength at the receiving end appeares to be strong. I have no clue why this is the result of my code.
Is there anyone here that can see what I am doingwrong?
Source code for the TX (Basic Stamp1 with Radio transmitter module):
Source code for the RX (Basic Stamp1 with Radio receiver module):
PCB layout for the BS1 TX card (click on picture to see full size):
The radio modules from Quasar are $5 each if anyone is interested.
Post Edited (search) : 1/1/2008 9:34:55 PM GMT