serial v/s parallel port
hello,
i am using the ADC inside atmega8535 that outputs 8bit data. i want to send this data to the computer and store it in a file. i am using 2.6.23.1 patched with RTAI-3.6.1. i am debating upon how to send this data.............use the parallel port or the serial port......any suggestions ?? |
---incorrect data in post---
|
My first thoughts would be via the serial port and send ASCII characters. Is the microcontroller on a circuit board? If so does the circuit board have a RS-232 converter chip of any kind?
|
Quote:
|
My bad - my friend mis-informed me, then.
|
From the Atmel data sheet, the microcontroller has a USART, so you should be able to communicate with the device via a serial interface. Your micro will probably need to have RS-232 level converters added, as a typical USART outputs only TTL level logic. As well, your micro will need to be programmed with some protocol that allows the Linux host to read and/or write to the micro over RS-232, and this should be done in accordance with the requirements of your project. Since you are apparently not experienced in these matters, I suggest using a protocol that sends ASCII formatted data, so that you can use standard serial comm's tools to observe the serial data. Linux examples of these would be minicom (typically included with Linux distros) and C-Kermit (my weapon of choice).
To confirm the comment of michaelk, parallel interfaces are absolutely not simply serial interfaces with more pins. --- rod. |
hello,
i ahve already programmed the atmega board. the adc in it gives an interrupt after each conversion and thus stores the data in the tx buffer of the UART. i have tested the program on the hyperterminal provided by the CVAVR and it worked. but when i used minicom and set the correct parameter that is same baud rate and everything on both sides i see nothing in minicom. minicom shows the status as offline. also i need a method to synchronize communication between the board and the computer's serial port. any suggestions on how should i go about this ?? |
Quote:
I've always preferred C-Kermit for this type of work, as I feel it provides more fine-grained control of the serial port. Plus it is scriptable, and sometimes that can be useful. Quote:
If you are writing code to communicate with your board via serial ports, you will probably want to consult some of the standard online tutorials and HOWTOs on the subject of serial comm's under Linux. If you aren't already acquainted with the use of the select() system call, it will probably be useful in this scenario. Serial HOWTO Serial Programming HOWTO Linux Serial Console HOWTO (for sorting out serial console login issues) --- rod. |
All times are GMT -5. The time now is 03:47 AM. |