hey everyone...
i am currently working on a wireless pcg device. my problem now is that my PIC C language codes are not working when transmitting signal from my RF module...im very new in doing hardware project..please could anyone help me? its urgent! i appreciate any help...thank you!!!
here are my codes:
i am currently working on a wireless pcg device. my problem now is that my PIC C language codes are not working when transmitting signal from my RF module...im very new in doing hardware project..please could anyone help me? its urgent! i appreciate any help...thank you!!!
here are my codes:
Rich (BB code):
#define Delay 50
#define BUFSIZE 10
#define LF 0x0A
unsigned short Buffer[BUFSIZE];
unsigned short input;
unsigned short output;
unsigned int i = 0;
void main() {
USART_Init(9600);
ADCON1 = 0;
TRISA = 0xFF;
PORTB=0;
TRISB=0;
input = ADC_Read(0);
Buffer=input;
do {
output= Buffer;
USART_Write(output);
delay_ms(Delay);
USART_Write(LF);
i++;
if (i==BUFSIZE)
{
i=0;
}
input = ADC_Read(0);
Buffer=input;
delay_ms(Delay);
} while (1);
}
Last edited: