Hi Gene,
I was looking at the PBC manual on the MElabs website. Here are some examples of setting the ports. You will also need to have a copy of the 12F629 datasheet to get the register information.
Code:
Symbol PortA = 5 'Define PortA register location
Symbol TrisA = $85 'Define PortA direction register location
Poke TrisA,0 'Make all PortA pins outputs
Peek PortA,B0 'Get current PortA pin states to variable B0
Bit1 = 1 'Set Bit1 in B0 which will become PortA pin 1 high
Bit3 = 0 'Set Bit3 in B0 which will become PortA pin 3 low
'Bit0, 2 and 4 will remain unchanged
Poke PortA,B0 'Send the new byte to PortA to complete the change
End
5.23. POKE
POKE Address, Value
Writes Value to the PICmicro MCU register at the specified Address. Special PICmicro MCU features such as A/D converters and additional I/O ports may be written using POKE. POKE is a PICBASIC™ Compiler statement and is not supported on the BASIC Stamp. (See PEEK for more information.)
Poke $85,0 'Write 0 to register hexadecimal 85 (Sets PortA to all outputs)
I also just finished looking for some older examples of programs I wrote in PBC but they are at home on my older computer so I don't have access to them until this coming weekend.
You need to look at the READ.ME file that came with your compiler program to check and see if the 12F629 will work with PBC. I didn't see it in the manual's list. You may be wasting your time with this chip if its not supported!
HTH,
BobK
Bookmarks