pic - Reading data from RCREG on pic18f4525 from bluetooth device -


i have project in trying send data android phone pic18f4525 through bluetooth device. currently, trying pic recognize simple letters 'a'.

from understand, when pic receives data through portc.7 (rx pin), store 8-bit information rcreg register , have read data. know pic receiving data receive flag being set. also, hooked scope receive pin of pic , receiving correct 01 sequences.

my question is, how read rcreg register access information? can tell, can use readusart usart.h header file not compile me trying access data without header file. there way this? have tried storing data directly (i.e. value = rcreg) , can 'read' register (the receive flag gets reset know i'm reading it) pic thinks value 0xff no matter send.

i using mplab version 8.85, icd2, , cc8e compiler. how read data appreciated. have read data sheet using usart on pic, read through compiler manual, , did many searches on topic no avail.

thanks help.

update:

done!!! after few hours of messing around got work. in fact baud rate issue. thank help!

what doing should work. sounds baud rate mismatch (somehow may have neglected set brg register or miscalculated value goes in it.) try writing txreg, triggering write on tx pin can catch on scope , verify actual baud rate same coming in on rx.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -