Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Serial communication with PIC16F84

Status
Not open for further replies.

johnny_hush

Member level 1
Joined
Jan 19, 2007
Messages
34
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,475
I'm using 16f84, and I need to program it, so when it receives some data, for example 8bits (with UART standard) it checks if received data matches to other data previously stored in eeprom, and if it is a match case it will go to one label, and if it isn't that it will go to other label.

It would be a great help if someone could post code, so I can see how I'm suppose to do that. [I work only in assembler]

Thanks,

Johnny
 

Code:
; suppose, you have a variable "uart_data" where you store the incomming data
; and you have another variable "ee_data" in which you load being checkd data 
; from EEPROM - I assume that you know, how to read data from internal EEPROM
; Z is status bit in STATUS register which shows the result of last 
; arithmatic or logical oparation.

        movf        ee_data,0              ; move the contents of ee_data to w
        andwf       uart_data,0            ; try to AND ee_data with uart_data
        btfsc       Z                      ; now check, what was the result of AND oparation
        goto        label_1                ; NOT IDENTICAL, goto lable_1   Z = 1
        goto        label_2                ; IDENTICAL, goto label_2 		Z = 0
 

Thanks!

Do you have something about receiving serial data?
 

Hello !!!
serial communications with the PIC16F84 is possible only per software!!! Means, you dedicate some pins to the serial communication and then you write the code. It's long and tough, if you never did it!!

I'd advise you to use a PIC with embedded USART like the PIC16F877. You'd just make some initializations (few lines of assembly code) and your PIC is fully ready for serial communitions.

Regards
 

Kabanga said:
Hello !!!
serial communications with the PIC16F84 is possible only per software!!! Means, you dedicate some pins to the serial communication and then you write the code. It's long and tough, if you never did it!!

I'd advise you to use a PIC with embedded USART like the PIC16F877. You'd just make some initializations (few lines of assembly code) and your PIC is fully ready for serial communitions.

Regards

Agreed, you can use a 16F628A which is a modern version of the 16F84
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top