Professional Documents
Culture Documents
A Tutorial on Robotics
Part IV : Microcontrollers & Computer Control
http://www.atmel.com/products/AVR/
WinAVR
WinAVR is a open source software development suite for Atmel AVR series of RISC microcontrollers GUI Integrated Development Environment Includes the GNU GCC compiler for C and C++. http://winavr.sourceforge.net/
Procyon AVRlib
AVRlib is a library of easy-to-use C functions for AVR controllers AVRlib aims to allow programmers to work quickly towards their end goal by reducing the time needed to write basic support functions and code http://www.procyonengineering.com/ avr/avrlib/
SUT 1:0 = 11
Computer Control
Parallel & Serial Port Communication
Null Modem Configuration just needs 3 core cable compared to 19 core parallel port cable Serial suited for wireless transmission Microcontrollers just need two pins (RXD & TXD) for communication
RS-232 Waveforms
Asynchronous Communication i.e. separate clock at both ends Frame synchronization done by the start / stop bit Line is kept logic 1 when idle. Start bit is logic 0 Bit order from LSB to MSB
Example Code
Receive Data Private Sub CommunicationTerminal_OnComm() Dim InputBuffer As String If CommunicationTerminal.CommEvent = comEvReceive Then InputBuffer = CommunicationTerminal.Input End If Use InputBuffer as per requirement End Sub Transmit Data If CommunicationTerminal.PortOpen = True Then CommunicationTerminal.Output = Hello End If
Thank You
End of presentation