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.

PICBasic Pro Compiler Problem

Status
Not open for further replies.

madmax55

Newbie level 3
Joined
Jan 17, 2007
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,309
serin+picbasic

HI every one

iv got a problem with my codes,but only for pic16f877.!! Same codes work fine in 16f84a. I 'dont undestand WHY 'SERIN' command doesn't work with 877. i bought differnt 877 , 'SEROUT' command works fine, but 'SERIN' not!
where do i make wrong? PLEASE HELP ME!

these are the codes.

----------------------------------------------

GRS var byte

SerGRS var portE.0
SerCKS var portE.1
Frek con 6

serout serCKS,frek,[13,"MEDIA AND COMMUNICATIONS.!",13,10]

loop:
serin serGRS,frek,GRS
serout serCKS,frek,[13,GRS,10]
goto loop
 

yo5oqa

Junior Member level 2
Joined
Oct 21, 2004
Messages
20
Helped
8
Reputation
12
Reaction score
4
Trophy points
1,283
Location
Romania
Activity points
188
picbasic pro serout problem

Maybe you have to make PortE.0, PortE.1 digital inputs, not analog (by default they are analog).
Adcon1=0x02 or something else (see the datasheet)
 

    madmax55

    Points: 2
    Helpful Answer Positive Rating

madmax55

Newbie level 3
Joined
Jan 17, 2007
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,309
picbasic pro keyboard

yo5oqa said:
Maybe you have to make PortE.0, PortE.1 digital inputs, not analog (by default they are analog).
Adcon1=0x02 or something else (see the datasheet)

i tried to convert to digital and datasheets says to convert to digital it must be ADCON1=6. but it didn't work.
i tried other ports(D,B,C) but they didn't work too.i really don't know WHY it is not working.the code i wrote;

GRS var byte

SerGRS var portE.0
SerCKS var portE.1
Frk con 6
ADCON1=%01100000

serout serCKS,frk,[13,"MEDIA AND COMMUNICATIONS.!",13,10]

loop:
serin serGRS,frk,GRS
serout serCKS,frk,[13,GRS,10]
goto loop
 

madmax55

Newbie level 3
Joined
Jan 17, 2007
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,309
Thank you yo5oqa,
i solved the problem thanks to your advice. the problem was, indicator led on the RX pin line. this led was blinking when i press a button on the keyboard. i removed the led and the problem solved.
it's interesting, because i use the same technique on pic16f84a RX pin , and it works fine with that. anyway thanks again
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top