Originally Posted by Russ Kincaid
Try this:
TRISA = %10000101
PORTA = %00000101
Arch
Originally Posted by Russ Kincaid
Try this:
TRISA = %10000101
PORTA = %00000101
Arch
PORTA = %00000101 changes the data register? That is not what I want to do.
What are you trying to change, if not the state of the port pins?Originally Posted by Russ Kincaid
Arch
I just want to define "PortA" as the number 5 so I can write "poke PortA" instead of "poke 5".
Actually, I don't want to do any of that, I just want to know why there is a syntax error when it is identical to what is in the demo program, which is supposed to be correct.
Last edited by Russ Kincaid; - 31st January 2006 at 21:21.
Hi,
Are you sure you have posted in the right place ?
As far as I am aware Symbol is not part of PicBasicPro.
I certainly have never needed to use it but have seen it used to declare aliases in Proton+.
With regard to Peek and Poke, this is from the PBP manual...
However, all of the PICmicro registers can be and should be accessed without using PEEK and POKE. All of the PICmicro registers are considered 8-bit variables by PicBasic Pro and may be used as you would any other byte-sized variable. They can be written directly or used directly in equations.
TRISA = 0 ' Set PORTA to all outputs
PORTA.0 = 1 ' Set PORTA bit 0 high
Regards
Keith
www.diyha.co.uk
www.kat5.tv
Hello,
Peek and Poke are used in PicBasic not the Pro version. "Symbol" is a reserved word in PBP and is also used in the PicBasic Compiler.
As for the programmer you are using, Chuck has several programmers on his site. Which one are you using and which compiler program are you using?
Giving us as much detail as possible will allow us to help you quicker which also helps to reduce your stress point in dealing with PIC's.
BobK
Hi Bob,Originally Posted by BobK
Thanks for that info. I wasnt aware that PBC was that different having only used the PRO version.
Because I hadnt come across "Symbol" in PBP but had seen it in a Proton+ program that I read I thought that maybe the original poster was using Proton.
I'll go back to sleep now![]()
Keith
www.diyha.co.uk
www.kat5.tv
Bookmarks