Well, I can only guess. You may have not set correctly I/O, ADC or other parameters of the chip yoy are using...
Ioannis
Well, I can only guess. You may have not set correctly I/O, ADC or other parameters of the chip yoy are using...
Ioannis
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
I already have changed the chip & verified the code and chip on another board. It just has to receive the data from Xbee receiver on its Rx pin,do some calculations & send it through Tx pin to LCD. Both Xbee & 18F1320 work fine when separated. As soon as 18F1320 is inserted in circuit something weird goes on.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
'Receiver side code
DEFINE OSC 8
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 20h ' Enable transmit, BRGH = 0
DEFINE HSER_SPBRG 12 ' 9600 Baud @ 8MHz, 0.16%
DEFINE HSER_CLROERR 1 ' Clear overflow automatically
TRISB = %00000000 ' Set RX (PortB.4) to output
char var byte
i var byte
TrisA= %00000000 'All PORTA pins configured as output
ADCON1= %11111111 'All PORTA pins configured as digital
loop:
'RCSTA = $90 ' Enable serial port & continuous receive
'TXSTA = $20 ' Enable transmit, BRGH = 0
'SPBRG = 12 ' 9600 Baud @ 8MHz, 0.16%
for i=1 to 6
Hserin [char] ' Get a char from serial port
next i
Pause 850 ' Delay for 1 usec,use larger delay for real device
'RCSTA = $90 ' Enable serial port & continuous receive
'TXSTA = $24 ' Enable transmit, BRGH = 1
'SPBRG = 25 ' 19200 Baud @ 8MHz, 0.16%
for i=1 to 6
Hserout [char]
next i
Pause 850
Goto loop ' Go back to loop and blink LED forever
;End
I really cannot follow your thinking.
You send 16 times the same character char and also receive 16 times a character into the same variable char.
Why is that?
What are you trying o do? It just doesn't make sense...
Ioannis
Does it matter......it receives chars wirelessly & sends it to hyper terminal on PC via serial port. Its just to check for chars i receive wirelessly.
Anyways I modified my design and am doing calculations on transmitter side. No microcontroller on receiver side now so the problem is resolved from my point of view. But still I have no idea how the original problem started.
Bookmarks