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.

PICBasic : Giving me headache!!

Status
Not open for further replies.

aghazi

Junior Member level 2
Joined
Jan 23, 2006
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,551
Hi,

As i am new in microcontrollers , I thought I should start with PICBasic. I have installed PICBasic with Microcode Studio. Got some simple basic programs on net as well as ebooks found on this board. For example one looks like this;

Symbol LED = B0
pins = %00000000
dirs = %11111111
main:
For LED = 0 To 7
High LED
pause 1000
Low LED
Next
For LED = 7 To 0 Step –1
High LED
pause 1000
Low LED
Next

GoTo main
End

By looking at the code, I had funny feelings. For example where the hell is B0 declared?!! Anyway when i try to compile program, its does give me errors for B0, LED, pins, dirs. Why is this so? If there is some include file required why isn't mentioned in the code? Also compiler does not have any options to include files (like JBuilder etc) in setting as well.

Am I missing something??

Regards,
AG
 

I didn't work with picbasic. but the code you have written seems to use LED as symbolic notation to mention RB0 pin but also it uses it like an iterator (for LED = 0 to 7)??? I think you should use another notation for the iterator.
 

in picbasic pro...

it is done as below:

symbol LED = portb.0

portb.0 need not to declare.... the compiler know it is the port b pin zero....

i think tht is not picbasic pro... it is the picbasic standard edition... mayb B0 is the same as portb.0 in picbasic pro...read the manual properly...

regards,
sp
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top