You have to help me.
In the service. The fightin '.
Edit/Delete Message
Is this the first time you have programmed a PIC?
If so, then you need to start by making an LED blink.
Dave
Always wear safety glasses while programming.
I did several projects in asm. I do not have much practice in picbasic. More
do a very light flashes on facil.em asm.
And my first project in picbasic.que I try fazer.mais not had much success.
You could ajuda.impretada.ficarei me very grateful.
Thank you
PBP CAN'T understand that ...start:
0.50 pot, B0
2.50 pot, B1
first good reason !!!
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
OK, Lets get familiar with PBP.
First read this thread
http://www.picbasic.co.uk/forum/showthread.php?t=543
It talks about setting the config bits in your code.
Then read this
http://www.picbasic.co.uk/forum/showthread.php?t=561
Being that you have written in ASM I will assume you have MPASM installed.
And I will also assume you are also using Micro Code Studio to write your PBP code in.
In MCS go to view-Compiler Options and make sure the bos "use MPASM" is checked.
Now the beginning of your code will look something this
Code:DEFINE OSC 4 @__config _XT_OSC & _WDT_ON & _CP_OFF
Dave
Always wear safety glasses while programming.
Dear mackrackit is the correct code to do
Thank you
'DEFINE OSC 4
'@__config _XT_OSC & _WDT_ON & _CP_OFF
'symbol trisb = 134
'symbol trisa = 133
'symbol portb = 6
'symbol porta = 5
'low 1
'input 0
'input 2
'start:
'pot 0,50,B0
'pot 2,50,B1
'B0 = B0 * 5
'B1 = B1 * 5
'y:
'if B0 < 100 then yf
'if B0 > 150 then yb
'x:
'if B1 < 100 then xr
'if B1 > 150 then xl
'serout 1,n9600,(5)
'goto start
'yf:
'serout 1,n9600,(2)
'goto start
'yb:
'serout 1,n9600,(1)
'goto start
'xl:
'serout 1,n9600,(3)
'goto start
'xr:
'serout 1,n9600,(4)
'goto start
'end
No, you still have not dealt with the variables.
Take a look in the PBP manual about variables and symbols.
Dave
Always wear safety glasses while programming.
Bookmarks