And here is a list with the instruction set plus a short list of error codes for the AVR part:
http://sites.google.com/site/species0x2118/commands.pdf?attredirects=0&d=1
Enjoy. ^.^
Showing posts with label turboc. Show all posts
Showing posts with label turboc. Show all posts
Monday, December 27, 2010
UART toy - part 3
And another part (not the last one) of my UART series.
Here is a piece of code for the PC to establish a connection to the RS232 testboard and to communicate with it..
http://sites.google.com/site/species0x2118/testboard.zip
It is just an example how to interface with the board and not a complete library. The example application sets the outputs, reads in the inputs, reads the analog input and calculates the voltage on that pin. Everything with hardware handshake.
But you need the right cable for the handshake. Otherwise change the "true" in the uartSend commands to "false" and delete the handshake activation.
The software is tested under DOS with TurboC and under Ubuntu Linux with GCC. The source compiles with Open Watcom too - but the Watcom binary is not tested under DOS yet.
I changed the compiler preprocessor macros for the recognition of operating systems and compilers several times - but did not test every combination with every operatin system and every compiler. Perhaps you need to figure out the correct setup for your system (or just delete the stuff you do not need).
It took me several hours to figure out, that linux needs an activated FIFO control register. Otherwise the data transmission will fail in 99% of the cases.
Here is a piece of code for the PC to establish a connection to the RS232 testboard and to communicate with it..
http://sites.google.com/site/species0x2118/testboard.zip
It is just an example how to interface with the board and not a complete library. The example application sets the outputs, reads in the inputs, reads the analog input and calculates the voltage on that pin. Everything with hardware handshake.
But you need the right cable for the handshake. Otherwise change the "true" in the uartSend commands to "false" and delete the handshake activation.
The software is tested under DOS with TurboC and under Ubuntu Linux with GCC. The source compiles with Open Watcom too - but the Watcom binary is not tested under DOS yet.
I changed the compiler preprocessor macros for the recognition of operating systems and compilers several times - but did not test every combination with every operatin system and every compiler. Perhaps you need to figure out the correct setup for your system (or just delete the stuff you do not need).
It took me several hours to figure out, that linux needs an activated FIFO control register. Otherwise the data transmission will fail in 99% of the cases.
Sunday, December 26, 2010
UART toy - part 2
Here is the code for the AVR as well as some pictures.
The C code: RS232_Testboard.zip
The code is public domain.
I am using Peter Fleury's AVR UART library for this project.
The first picture shows a test application, written on an 80286 with Borland TurboC that communicates with the RS232 testboard:
The second picture shows the circuit itself:
The C code: RS232_Testboard.zip
The code is public domain.
I am using Peter Fleury's AVR UART library for this project.
The first picture shows a test application, written on an 80286 with Borland TurboC that communicates with the RS232 testboard:
The second picture shows the circuit itself:
Subscribe to:
Posts (Atom)

