electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

PICBasic Pro Compiler Problem


Post new topic  Reply to topic    EDAboard.com Forum Index -> PC Programming and Interfacing -> PICBasic Pro Compiler Problem
Author Message
madmax55



Joined: 17 Jan 2007
Posts: 4


Post17 Jan 2007 23:40   

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
Back to top
yo5oqa



Joined: 21 Oct 2004
Posts: 20
Helped: 3
Location: Romania


Post18 Jan 2007 6:26   

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)
Back to top
Google
AdSense
Google Adsense




Post18 Jan 2007 6:26   

Ads




Back to top
madmax55



Joined: 17 Jan 2007
Posts: 4


Post18 Jan 2007 22:10   

picbasic pro keyboard


yo5oqa wrote:
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
Back to top
madmax55



Joined: 17 Jan 2007
Posts: 4


Post22 Jan 2007 13:20   

Re: PICBasic Pro Compiler Problem


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
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> PC Programming and Interfacing -> PICBasic Pro Compiler Problem
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
PICBasic Pro Compiler programming....need help here...... (3)
What are the limits of PICBASIC PRO™ Compiler Demo? (5)
problem with picbasic pro (4)
Better for PIC:PicBasic Pro,Picbasic Proton Pl or Assembler? (4)
PICBasic Pro (2)
PICBasic Pro Question !? (3)
division in picbasic pro (3)
picbasic pro applications (3)
proteus and picbasic pro (2)
PICBasic Pro Floating Point (3)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS