Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About cdenk

  • Rank
  1. I am converting the provided USART basic to interrupt for the receive, and am having problems with "Static". Have also tried with "Dim c As Byte" "global" (outside functions). Here's the code: '************************************************************************ '* * '* HARDWARE USART AT 9600 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() Dim c As Byte 'dim id_string As String (10) This is the ID of this unit. 'Initialize high interrupt for UART receive ' Disable the watch dog. wdtcon = 0 ' enable interrupts rcon = rcon | (1 << IPEN) 'enable priority interrupts ipr1 = ipr1 | (1 << RCIP) 'Enable high priority receive interrupt intcon = intcon | (1 << GIE) 'set global interrupt bit pir1 = pir1 | (1 << RCIF) 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 usart_tx© 'get a char from rs232 terminal and display on lcd Loop End Sub function Interrupt() static c As Byte c = call usart_rx() pir1 = pir1 | (1 << RCIF) end function
  2. The Baud rate calculator I down loaded today allows the 3 input variables to be changed, but the displayed results are stuck at 600 baud. I'm assuming that this number is the same as in the Microchip processor manual (PIC18F1320) for 9600 baud and 8mhz = 51.
  3. >>>> I started a new project, added the file to the new project, and compiled without errors. Don't know what was goofy, but it works now. Don't need answer to the below.
  4. I have BoostC Optimizing C Compiler Version 6.40 (for PIC16 architecture). The processor include file (and it's the only include at the moment) isn't found. Here is the output listing: Licensed to XXXXX under Single user Lite License for 1 node(s) Limitations: PIC12,PIC16 max code size:2048 words, max RAM banks:2, Non commercial use only WELL SENSOR.C E:\data\MICROCHIP\WELL SENSORS\WELL SENSOR.C(10): Unable to open include file: 16f84A.h 1 errors detected failure Error: preprocessing error "C:\Program Files\SourceBoost\boostc.pic16.exe" "WELL SENSOR.C" -t PIC16F84A Exit code was 1. Removing target: WELL SENSOR.obj Done Have tried changing to another process that is included with the C compiler. Have confirmed the file exists in the original install folder, have copied to the drive/folder where the project is located, and with Project > Add files, added the file to the project. Didn't think these were required but thought it was worth a try. The Compiler package is a new install, and this is first project to get started.
  • Create New...