Could it be that you forgot to put a space between "OSC" and "20"?
Try changing DEFINE OSC20 to DEFINE OSC 20.
Ben
Could it be that you forgot to put a space between "OSC" and "20"?
Try changing DEFINE OSC20 to DEFINE OSC 20.
Ben
don't tell us what your problem is in case we could help![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
yeah, i guess i should mention whats happening or not happening...
so the LED doesnt light up, ive checked for voltage with my meter and theres nothing from the pin to ground..
i should also mention that i caught that missing space (OSC 20) right after i posted, but it still didnt help... the hardware should be good, i think im jsut missing something in the software.
ok, here is the last version of my code... still cant get it to work...
<code>
DEFINE OSC 20
TRISA = 0
TRISB = 0
TRISC = 0
TRISD = 0
TRISE = 0
TRISF = 0
trisg = 0
LCDA1 VAR PORTE.6
LCDB1 VAR PORTE.7
LCDC1 VAR PORTE.3
LCDD1 VAR PORTG.4
LCDE1 VAR PORTG.3
LCDF1 VAR PORTE.5
LCDG1 VAR PORTE.4
LCDDP1 VAR PORTG.2
LCDA2 VAR PORTD.2
LCDB2 VAR PORTD.3
LCDC2 VAR PORTE.0
LCDD2 VAR PORTG.0
LCDE2 VAR PORTG.1
LCDF2 VAR PORTD.1
LCDG2 VAR PORTD.0
LCDDP2 VAR PORTE.1
LCDA3 VAR PORTD.6
LCDB3 VAR PORTD.7
LCDC3 VAR PORTB.0
LCDD3 VAR PORTB.1
LCDE3 VAR PORTE.2
LCDF3 VAR PORTD.5
LCDG3 VAR PORTD.4
pause 500
'MAIN PROGRAM\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
start:
high LCDa1
high LCDb1
high LCDc1
high LCDd1
high LCDe1
high LCDf1
high LCDg1
high LCDdp1
high LCDa2
high LCDb2
high LCDc2
high LCDd2
high LCDe2
high LCDf2
high LCDg2
high LCDdp2
high LCDa3
high LCDb3
high LCDc3
high LCDd3
high LCDe3
high LCDf3
high LCDg3
pause 500
low LCDa1
low LCDb1
low LCDc1
low LCDd1
low LCDe1
low LCDf1
low LCDg1
low LCDdp1
low LCDa2
low LCDb2
low LCDc2
low LCDd2
low LCDe2
low LCDf2
low LCDg2
low LCDdp2
low LCDa3
low LCDb3
low LCDc3
low LCDd3
low LCDe3
low LCDf3
low LCDg3
pause 500
goto start
end
</code>
so it powers up, but it doesnt put and of the ports high.. there is only one LED connected, the rest of the pins arent connected. but i have put my meter across them to see if there is any voltage...
3 things,
- no configuration fuses.. make sure you set the right osc mode
- disable all multiplexed analog converter, comparator, voltage reference or else fancy stuff
- with 18Fs, you want to use LAT instead of PORT to avoid R-M-W behaviour. The best solution is often write to the whole port in one shot instead of using multiple High/Low lines.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
ok....
1. i wasn't sure how to set the fuses before, but since then i have discovered the .inc file, and i have changed them in there. if i try to add it to the code too, it says I'm overwriting code space.
2. i knew i had to do that... i just forgot...
3. i have never even heard of LAT.. is it in the manual? i had a quick look but couldn't find it there. and when you say write the whole port instead of multiple lines, do you mean all of portb at a time? or am i missing something??
thanks for the help.. i tried using a PIC18F before, and ran into a lot of problems too, so i put that project on hold for a while and went back to 16F's...
heres the thread about the Robot i built using a PIC18F6585.. http://www.picbasic.co.uk/forum/show...light=treadbot
Awwwww,
I wondered what happened to the Treadbot.
Poor little guy. Back-burners such a lonely place. (except at my house, lot's of company there)
Hope you get back to it some day.
And I hope I can help out more when you do.
<br>
DT
Bookmarks