Ahhmmm...
You read the PBP-manual ?
You have found SEROUT, what's about SEROUT2 ?
Ahhmmm...
You read the PBP-manual ?
You have found SEROUT, what's about SEROUT2 ?
PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2
i have read pic basic manual in melabs but still cant understand it..
can u give me another source...
I am an amateur is PIC and pic basic pro program..
this is myprogramming code can u help me in solving my problem..
DEFINE CHAR_PACING
INCLUDE "modedefs.bas"
DEFINE OSC 4
cnt var byte
TrisB=%00000011
cnt=0
loop:
IF PORTB.0=1 Then
cnt=cnt+1
endif
if PORTB.1=1
GoSub senddata
EndIF
GoTo loop
senddata:
SerOut PORTB.1,N2400,["OK",#cnt]
return
End
RX DATA
symbol second = 1000
INCLUDE "modedefs.bas"
DEFINE OSC 4
dataon VAR BYTE
TrisB=%000000001
Pause second
lcd $FE,1,"READY"
Loop:
SerIn PORTB.0,N2400,["OK"],dataon
LcdOut $FE,#C0
LcdOut "Count= ",#dataon
GoTo Loop
End
my problem is the display doesnt show the correct data that is send from PIC
i use LCD HD44780
I think you want to transfer byte-values.
Use
SerOut PORTB.1,N2400,["OK",cnt]
and
LcdOut $FE,$C0
LcdOut "Count= ",dec dataon
PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2
Bookmarks