Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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...?

amenoera said:
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 .

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top