Source Code File:"Usart.bas"

'************************************************************************
'*                                                                      *
'*      HARDWARE USART AT 4800 BAUD PROJECT FOR USE WITH BOOST BASIC    *
'*                                                                      *
'*             WRITTEN BY       :  PUNERJOT SINGH MANGAT                *
'*             COUNTRY          :  INDIA                                *
'*             CITY             :  PATIALA                              *
'*             WEB PAGE         :  www.rackeys.com/punerjot             *
'*             EMAIL            :  punerjot@rackeys.com                 *
'*             SOURCEBOOST ID   :  c58_4311                             *
'*             RELEASE DATE     :  May 24, 2006                         *
'*             REVISED DATE     :  May 24, 2006                         *
'*                                                                      *
'************************************************************************

'
'
'This project file demonstrates the use of the usartbaslib.bas file for making use of
'the hardware USART present inside the PIC
'Note that use of Max232 is must as the signals are inverted
'
'


Sub main()

    call lcd_init()         'Initialize the LCD to appropriate format   
    call usart_init()       'Initialize software rs232

    call usart_tx(65)    'send char A to rs232 terminal
    call usart_tx(66)    'send char B to rs232 terminal
    call usart_tx(67)    'send char C to rs232 terminal
    
    
    Do while 1 
      call lcd_putch(call usart_rx())     'get a char from rs232 terminal and display on lcd
    Loop

End Sub

http://www.sourceboost.com

Copyright © 2006 SourceBoost Technologies