Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Fandu

  1. OK, I modified the code to just use a global array and everything compiles fine. Unfortunately it doesn't work I modified the USART routine to set it up for a 20MHz processor and 9600 baud ( spbrg = 32). All I'm getting out of the serial port when I run the program is 0x01. Is there any obvious reason for that? Also, I am using the Bloater boot loader, which needs the code origin at 0x0004. I noticed that SourceBasic is ignoring the pragma directive... How to I control code locations in SourceBasic? Thanks ' I2C - Serial Test Controller ' Uses PIC16F877A @ 20Mhz #pragma
  2. Hey, I'm trying to learn to use Basic on the PIC and seem to be having trouble with array indexing and/or passing arrays to functions. I'm trying to write a simple program that will accept up to 20 characters from a PC over RS232, then simply echo those back when Enter is pressed. I'm getting compiler several compiler errors with this code: Sub prompt() call usart_tx(126) ' Print "-" call usart_tx(62) ' Print ">" End Sub Sub print_str( msg(20) As Char, j As Integer) Dim k As Integer ' k - string position counter k = 0 Do while k < j call usart_tx( msg(k) )
  • Create New...