bcd TTL to RS232

Thread Starter

purejoker

Joined Feb 15, 2009
3
hi there, im new to these forums, so hello everyone!

i wannted to ask if it was possible to connect a bcd output to a rs232, so that i would be able to read the data on the computer instead of a 7 segment display?

the bcd output's via ttl and the rs232 accepts ttl signals so would this work, or i still require a microprocessor?

thanks for your help

purjoker!
 

beenthere

Joined Apr 20, 2004
15,819
There is a difference between a value and an encoding of it for use in documents. A BCD value that gets displayed will be one thing, that number sent as data will be encoded as ASCII. If you look at the data sheet for a MAX232 IC, you'll see what the encoding is necessary, and what else might be necessary to transmit the value serially.
 

AlexR

Joined Jan 16, 2008
732
If you just want to transmit BCD data then you will need a UART to convert the data into a serial stream and as beenthere suggests a MAX232, which despite what its name implies is a charge pump level converter that converts TTL levels to +/-12volt required by the RS232 standard.

If however you want to display the BCD data as ASCII characters on your computer you will need to have some intelligence somewhere in the system. You can either write a program in the PC to convert BCD data to ASCII for display on the screen or use a microcontroller at the send end to do the conversion. The advantage of a microcontroller is that it has a built-in UART and if you are transmitting ASCII data you can display the results using a simple terminal program such as Hyper Terminal.
 

AlexR

Joined Jan 16, 2008
732
If you are using a PIC you don't need the BCD-7seg display IC. Just feed the BCD straight into the PIC, use software to convert it to ASCII for transmission.

I would not use the PIC16F84 as its a very basic chip and does not have an on-board USART so you would have to bit-bash the USART function in software, instead go for something like the PIC16F628A or PIC16F87 or for that matter any chip that has a USART.

I don't know how familiar you are with PIC microcontrollers but there is plenty of info in the WEB, google is your best friend there. Also the Microchip site has all the data sheets, applications notes and software examples.
 
Top