Shop OBEX P1 Docs P2 Docs Learn Events
Interfacing different TTL/CMOS logic levels — Parallax Forums

Interfacing different TTL/CMOS logic levels

searchsearch Posts: 28
edited 2008-01-01 20:47 in General Discussion
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?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-12-28 21:53
    All of the Stamps (with the exception of the Propeller-based Spin Stamp) use 5V logic and a 5V power supply. Usually this is specified as +- 10% which gives you the 4.5 to 5.5V range. A logic low is usually considered anything below 0.8V or sometimes 1.5V (TTL or CMOS inputs respectively). A logic high is usually considered anything above 2.0V or sometimes 3.5V (again TTL or CMOS inputs respectively).

    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.
  • searchsearch Posts: 28
    edited 2008-01-01 20:47
    My project is building a radio remote system, using the Quasar QFM-TX1 and QFM-RX1 radio telemetry modules.

    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):
    Setup:
        INPUT 0    'Pushbutton pin, turns LOW when depressed
        OUTPUT 6    'LED pin
    
    Main:
        IF PIN0 = 0 THEN SendData    ' If button is depressed, then SendData
        PAUSE 100    ' Time delay between each button state check
    GOTO Main
    
    SendData:
        GOSUB FlashLED
        GOSUB SOut
        PAUSE 100    'Minimum time delay before new button input is accepted
    GOTO Main
    
    FlashLED:
        PIN6 = 1    'LED On
        PAUSE 100    'Period for LED to be On
        PIN6 = 0    'LED Off
    RETURN
    
    SOut:
        PAUSE 100    'Delay before sending the data
        SEROUT 7, N1200, (65)
    RETURN
    
    



    Source code for the RX (Basic Stamp1 with Radio receiver module):
    Setup:
        SYMBOL sData = B0
    
    Main:
        SERIN 0, T1200, sData
        DEBUG sData
    GOTO Main
    
    



    PCB layout for the BS1 TX card (click on picture to see full size):
    137131.jpeg

    The radio modules from Quasar are $5 each if anyone is interested.

    Post Edited (search) : 1/1/2008 9:34:55 PM GMT
    806 x 580 - 107K
Sign In or Register to comment.