Pic16f84a Question ?

Status
Not open for further replies.

amenoera

New Member
Hi All .

I Have A Litle Problem Here , And Am Sure I Will Find The Answer Here . The Problem Is :
Am Using Picbasic Pro Compiler .
I Need To Read Portb Value . And Then Send It Serially To Another Pic .

The Problem Is When I Connect My Pic16f84a It Send The Value Continuously Without Stop . And I Dont Need That I Need When I Make Pin 0 High Then Send "1" And When I Make Pin 7 High Send "128"
Etc . .
So What Can I Do For That ?

Thanks .
 
You read the value of the port and store it in a register.

Then you read the port again.

If it hasn't changed, go back to the step where you read it again.

If the value has changed, transmit the new value.
Move the new value to the old value
go to the step where you read the value of the port.
 
Capitalizing every word...?


When you write in your native language, do you capitalize every word?

Strange habit. It makes hard / tyring to read what you write.

How did you learn to write like that?
 
I think you are converting binary value to a Decimal value.This Decimal value you sending it to another PIC as I understand.

Diver300's answer will suits you backing up the old status & compare with the new status.If it is changed update the display otherwise exit the routine without sending serial data.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…