Didn't find your answer? Ask the community — no account required.
P
PeteG
same.
After power up the ports are set to input. I don't see anything in those commands that set the port or the pin to output before you start writing to it. The fact that you say the pins are all tri-stated suggest the same.
You need to find the command to set the TRISB register to output on that pin. Since I'm not sure what language you're writing in I don't know what command you need to add but I'm sure you can work it out.
Pete
J
Jack B. Pollack
Thanks for your reply.
I just tried TRISB = %00000000 and Output B.1
Both are valid commands according to the help file for the MicroCode Studio editor/compiler. Unfortunately results are the same (tri-state). Any other ideas?
a
to
J
John Fields
Yeah.
Since it seems like you\'re going to be here for a while, why not do
like the Romans do and bottom post?
P
PeteG
Studio
Nothing that comes to mind.
May be someone who has some knowledge of the language you are using can help.
There's really not that much more to blinking a LED on a PIC than what I see you're doing.
Also, you should put your reply at the bottom of the message not the top; it's newgroup etiquette.
Pete
A
Anthony Fremont
using a
same.
ANSEL = 0
B
Boon
Put the word "End" inside your code and try again.
"Jack B. Pollack" ?ÈëÏû?ÐÂÎÅ:DL2Mf.5715$ snipped-for-privacy@news-wrt-01.rdc-nyc.rr.com...
A
Anonymous
Hello,
It looks like PicBasic or PicBasic Pro.
I haven't used the 16F88 PIC but a search has shown it has the same pinout as the 16F84 and uses an internal oscillator. Pete is right in that you have to set the TRISA and TRISB registers to what you want.
For example using a 16F84 TRISA = %00000 'All PortA output pins output PORTA = 0 'Set all PortA pins LOW TRISB = %01000010 'RB1 & RB6 input all other PortB pins output PORTB = 0 'Set all PortB output pins LOW
If you go to
formatting link
there is a forum and an archive available. However it seems the forum may be down at the moment, either that or my PC is playing up.
I'm no expert but try the program below. I've dressed it up a little with remarks as it's a good habit to get into for when you start on much larger programs. I'll remember that and three months later when you look at it again it's "What?"
'******************************** ' Blinking LED program * '********************************