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.

send and receive data to anthor pic16f84a

Status
Not open for further replies.

potetojb

Member level 3
Joined
Feb 25, 2006
Messages
63
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Location
Johor,Malaysia
Activity points
1,931
Need Help

I write the serout and serin command to send data from PIC to another PIC

can anyone tell me, how to solve it, thank you

i am try many way to solve it , but still cant solve it

i am using PIC16F84A model try a simple code below

TX DATA


INCLUDE "modedefs.bas"
DEFINE OSC 4

loop:
IF PORTB.0=0 Then
GoSub led_on
Else
GoSub led_off
EndIF
GoTo loop


led_on:
SerOut PORTB.1,N2400,[$FF,$FF,"OK","A"]
Return

led_off:
SerOut PORTB.1,N2400,[$FF,$FF,"OK","B"]
Return

End



RX DATA

INCLUDE "modedefs.bas"
DEFINE OSC 4
dataon VAR BYTE
led1 VAR PORTB.1
led2 VAR PORTB.2

Loop:

SerIn PORTB.0,N2400,["OK"],dataon
IF dataon="A" Then led_on
IF dataon="B" Then led_off
GoTo Loop

led_on:
High led1
Low led2
GoTo Loop

led_off:
Low led1
High led2
GoTo Loop

End

after i on the supply and push the switch the led does not light

to see the led light on/off how could be???

really need a help

thank you
 

I use c so i'm not to up on basic, but I cant see where you configure the output lines data directions?
 

I suggest you to use PIC16f628 instead of 16f84.It has USART modul,it's much more easier to communicate.
 

ok coshkun..

can u give me some infomation about PIC16F628 and USART...

i am an amateur in PIC and PIC BASIC PRO
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top