Help needed for PC-controlled Wireless Notice Board on USART
Hey guys,
I'm doing a project on wireless notice board, and my codes are in assembly language
1. The wireless module is zigbee, and it's from pc to PIC,
2. The display is dot-matrix and data will be taken from EEPROM to be displayed
3. Only one way communication using USART from Zigbee to PIC6f628A
4. PIC will receive new data whenever available from ZigBee and store in EEPROM
5. The PC will be sending data through a ZigBee transmitter to the receiver.
So, currently I've got my display unit to work and everything, and can display 128 characters. All of which is pre-loaded into the EEPROM.
I'm having trouble with the communications part. How do I use USART to receive a data string and store into EEPROM one byte at a time? Plus I don't want to do the polling method.
Attached is the codings that i've written.
1. The original code is working fine and i need to embed the USART part into it
2. The Usart RC file is the one I've written for serial communication with ZigBee that needs to be embedded.
The code should work as: Displaying out data from EEPROM and when new data is received, it will take it and store into EEPROM and then start displaying all over again. Please help. Thanks
Here is the Usart part:
I'm doing a project on wireless notice board, and my codes are in assembly language
1. The wireless module is zigbee, and it's from pc to PIC,
2. The display is dot-matrix and data will be taken from EEPROM to be displayed
3. Only one way communication using USART from Zigbee to PIC6f628A
4. PIC will receive new data whenever available from ZigBee and store in EEPROM
5. The PC will be sending data through a ZigBee transmitter to the receiver.
So, currently I've got my display unit to work and everything, and can display 128 characters. All of which is pre-loaded into the EEPROM.
I'm having trouble with the communications part. How do I use USART to receive a data string and store into EEPROM one byte at a time? Plus I don't want to do the polling method.
Attached is the codings that i've written.
1. The original code is working fine and i need to embed the USART part into it
2. The Usart RC file is the one I've written for serial communication with ZigBee that needs to be embedded.
The code should work as: Displaying out data from EEPROM and when new data is received, it will take it and store into EEPROM and then start displaying all over again. Please help. Thanks
Here is the Usart part:
org 0x04 ;interrupt service vector movwf W_Save movf STATUS,W clrf STATUS movwf STATUS_Save movf PCLATH,W movwf PCLATH_Save movlw 0x00 movwf eefile goto RCINT movf PCLATH_Save movwf PCLATH,W movf STATUS_Save movwf STATUS,W movf W_Save retfie ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; movlw 0xC0 ;setting up the interrupt, goes into the main part movwf INTCON movlw 0x00 movwf PIR1 movlw 0x68 bsf STATUS,RP0 movwf SPBRG movlw 0xA0 movwf PIE1 bcf TXSTA,BRGH bcf TXSTA,SYNC bcf STATUS.RP0 bsf RCSTA,SPEN bsf RCSTA,CREN bcf RCSTA,RX9 bsf STATUS,RP0 movlw 0x02 movwf TRISB ;RB1 is the rx pin end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; RCINT movf RCREG,W bsf STATUS,RP0 movwf EEDATA bcf STATUS,RP0 movf eefile bsf STATUS,RP0 movwf EEADR bcf STATUS,RP0 call write incf eefile,F movf eefile bsf STATUS,RP0 movwf EEDATA movlw 0x7F movwf EEADR bcf STATUS,RP0 call write bcf PIR1,RCIF retfie write bsf STATUS,RP0 ;select bank1 ;writes it to EEPROM bsf EECON1,WREN ;enable write bcf INTCON,GIE movlw 0X55 ;unlock codes movwf EECON2 movlw 0xAA movwf EECON2 bsf EECON1,WR ;write begins bsf INTCON.GIE bcf STATUS,RP0 ;select bank0 writeA btfss PIR1,EEIF ;wait for write to complete goto writeA bcf PIR1,EEIF bsf STATUS,RP0 ;select bank1 bcf EECON1,WREN ;disable other writes bcf STATUS,RP0 ;select bank0 retlw 00
Replies
-
Harshad Italiyacan you post your Project's Circuit diagram please.
-
stalk3r21Hey there,
Here it is the hardware design.
#-Link-Snipped-#
(sorry, I don't know how to upload a picture here)
The Dot-Matrix is common cathode. And PIC will only receive serial data from PC through ZigBee and will not send any serial data out. -
RNRhey, can you explain about the working of the wireless notice board using zigbee technology.
If possible give the circuit diagram also........ -
Harshad Italiya
what range you want to cover using zigbee?RNRhey, can you explain about the working of the wireless notice board using zigbee technology.
If possible give the circuit diagram also........
You are reading an archived discussion.
Related Posts
Hi friends,
I wanted to do a summer internship.I wanted info about various companies related to Mechanical like Alfa Laval,Mahindra & Mahindra etc which are located in Maharashtra,Bharat.I would be...
I'm doing B.Tech EEE .. I'm really confused of selecting ma higher studies... I need to earn good salary... Plz help me
hello CEans
I am not able to open my icons.....whenever i am trying to do so its not opening.....i have tried to restore it but of no use.....i tried to...
Hello everyone, I have a couple of questions for you
1- I’m working on a back-filling of a causeway in the sea, can I use salt water in watering for...
HI, Everyone. I am using Windows 7 Ultimate, now I want a software that can show me what changes in any files or registry done by running a software or...