Jump to content
Sign in to follow this  
Akropolis

Rs2323_driver.h Won't Work?

Recommended Posts

I'm trying to send something using the the rs232_driver.h. I tried quite a few things, but I always get the same error.

 

#pragma CLOCK_FREQ 4000000

#include <system.h>
#include <rs232_driver.h>

#define bit_time 104 // For RS232 - (not used but required for compiling)

#pragma DATA 0x2007, _HS_OSC & _WDT_OFF & _LVP_OFF

void main()
{	
uart_init(1,25);  // set high speed divisor mode and divisor value
}

 

This is the minimum amount of code I need to get the error. ;)

 

Error:

Building...
BoostC Optimizing C Compiler Version 6.55 (for PIC16 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2006 Pavel Baranov
Copyright(C) 2004-2006 David Hobday

Single user Lite License (Unregistered) for 0 node(s)
Limitations: PIC12,PIC16 max code size:2048 words, max RAM banks:2, Non commercial use only


rs232.c

failure
C:\Program Files\SourceBoost\include\rs232_driver.h(457:27): error: failed to generate expression
C:\Program Files\SourceBoost\include\rs232_driver.h(457:27): error: invalid operand 'GETC<TX_BIT, TX_PORT, TX_TRIS, RX_BIT, RX_PORT, RX_TRIS, e_SPBRG, e_RCREG, e_TXREG, e_TXSTA, e_RCSTA, e_TXIF_BIT,e_TXIF_PIR, e_RCIF_BIT, e_RCIF_PIR, MODE>()'
C:\Program Files\SourceBoost\include\rs232_driver.h(457:25): error: failed to generate expression
C:\Program Files\SourceBoost\include\rs232_driver.h(457:25): error: invalid operand '= '
C:\Program Files\SourceBoost\include\rs232_driver.h(457:185): error: failed to generate expression
C:\Program Files\SourceBoost\include\rs232_driver.h(457:185): internal error: failed to generate 'while' expression
C:\Program Files\SourceBoost\include\rs232_driver.h(457:2): error: error in 'while' loop statement
C:\Program Files\SourceBoost\include\rs232_driver.h(465:2): error: failed to generate expression
C:\Program Files\SourceBoost\include\rs232_driver.h(465:2): error: Error in the body of 'while' expression
C:\Program Files\SourceBoost\include\rs232_driver.h(466:2): error: failed to generate expression
C:\Program Files\SourceBoost\include\rs232_driver.h(467:2): error: failed to generate expression
P:\PIC\MoniLED Mainunit.c(31:2): error: failed to generate expression
"C:\Program Files\SourceBoost\boostc.pic16.exe" "rs232.c" -t PIC16F876 
Exit code was 1.
Removing target: rs232.obj
Done

 

I am using a PIC16F876 @ 4 Mhz. Any idea why this error?

 

Thanks in advance

Share this post


Link to post
Share on other sites

Akropolis,

I'm trying to send something using the the rs232_driver.h. I tried quite a few things, but I always get the same error.

You need to declare some things before the #include<rs232_drive.h>.

Have a look at the supplied sample project - serial_test.__c

 

Regards

Dave

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...