maria258
Member level 2
Dear all,
I tried some coding for transmitting and got a voltage return from my PIC, swinging between 1.25V to 1.16V and back. Do you think this is correct? my code is attached below.
thanks
i only read the voltage by a multimeter. still have to make the hardware to plug it with my pc. the actual problem is the coding that worries me cos then i need to interface with a graphic lcd.
I tried some coding for transmitting and got a voltage return from my PIC, swinging between 1.25V to 1.16V and back. Do you think this is correct? my code is attached below.
thanks
Code:
#include <htc.h> //header file for Pic Micro
#include <stdlib.h>
__CONFIG (0x3F72); //configuration fuses PIC16F877 from software
void init(void);
void transmit(void);
void main()
{
init();
transmit();
while(1);
}
void init()
{
unsigned int count;
PORTC=0x00;
TRISC=0xFF;
TXSTA=0b001000110;
RCSTA=0b10010110;
SPBRG=0b01000000;
INTCON=0b11000000;
PIR1=0b00010000;
PIE1=0x00;
count=0;
}
void transmit()
{
while(1)
{
TXREG=0x00;
PIE1=0x00;
}
}
i only read the voltage by a multimeter. still have to make the hardware to plug it with my pc. the actual problem is the coding that worries me cos then i need to interface with a graphic lcd.