fernandomierhicks
New Member
Hi:
I am having problems interfacing a 16f690 with the PC. I am using the sci.h and sci.c source files provided in the samples directory of the compiler.
The problem is that i cant send the ninth bit while in nine bit transmission mode. My code looks like this
while(1){
sci_Init(9600,SCI_EIGHT);
sci_PutByte(0x25);
delay(1000);
}
That works fine but when I change it to
while(1){
sci_Init(9600,SCI_NINE);
sci_PutNinth(0x00); /* ninth bit is zero */
sci_PutByte(0xff); /* and data is 0xff */
}
the compiler throws me the following error:
(499)undefined symbol: _sci_PutNinth
None of the source files have been modified, so I don't know whats the bug.
Also i would like to know what this means:
#define sci_PutNinth(bitnine) (TX9D = bitnine?1:0; )
unsigned char
sci_GetNinth(void)
{
while(!RCIF)
continue;
return RX9D; /* RCIF is not cleared until RCREG is read */
}
that's the code for the putninth function inside the source file.
Thanks in advance
I am having problems interfacing a 16f690 with the PC. I am using the sci.h and sci.c source files provided in the samples directory of the compiler.
The problem is that i cant send the ninth bit while in nine bit transmission mode. My code looks like this
while(1){
sci_Init(9600,SCI_EIGHT);
sci_PutByte(0x25);
delay(1000);
}
That works fine but when I change it to
while(1){
sci_Init(9600,SCI_NINE);
sci_PutNinth(0x00); /* ninth bit is zero */
sci_PutByte(0xff); /* and data is 0xff */
}
the compiler throws me the following error:
(499)undefined symbol: _sci_PutNinth
None of the source files have been modified, so I don't know whats the bug.
Also i would like to know what this means:
#define sci_PutNinth(bitnine) (TX9D = bitnine?1:0; )
unsigned char
sci_GetNinth(void)
{
while(!RCIF)
continue;
return RX9D; /* RCIF is not cleared until RCREG is read */
}
that's the code for the putninth function inside the source file.
Thanks in advance
Last edited: