Have you tried a different pin another LED?
I do not see anything wrong with the part of your code you have posted.
How do you have TRISB set?
If you post the whole code it would help.
Have you tried a different pin another LED?
I do not see anything wrong with the part of your code you have posted.
How do you have TRISB set?
If you post the whole code it would help.
Dave
Always wear safety glasses while programming.
Hi,
What about your oscillator settings ???
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 " !!!
*****************************************
That's actually the entirety of the code(although I set TRISB to 0 anyway).Not much to it.Also the oscillator setting is set for crystal.(xt).I tried it with a different pin and came up with the same problem.When I took the LED away from pin 6(rb0) however, the other lit up.
I'm wondering if it may be a power supply problem.I've currently got a 7805 voltage regulator to step down a 9 volt battery, but I'm wondering if the battery is too low.
The battery rates at 7.97 volts according to my meter.Could this be too low after the 7805 is connected?
Shawn
PicBasic will defualt to 4MHz. So if your crystal is running at 4 then you should be OK.
I think it is a good idea to leave nothing to chance and define it at all times.
I also think it is better to set each bit of TRIS?.Code:DEFINE OSC 8 'Speed of OSC
0 = Outpuit
1 = Input
While you are brushing up on things, these two threads are a must read.Code:TRISB = $00000000
Even if you do not set the fuses in code space this will give you a better understanding of how it all works.
http://www.picbasic.co.uk/forum/showthread.php?t=543
The chip you are using has analog.
http://www.picbasic.co.uk/forum/showthread.php?t=561
Power supply.
9 volt battery is to wimpy. Better off to use a pack of AA if you want to run off batteries.
Check the data sheet of the 7805 to find minimum voltage. At least 2 volt higher than out put.
Dave
Always wear safety glasses while programming.
I looked at the melabs datasheet and it says that I do not have analog pins. I'm not go to dismiss the possibility that I misunderstood though
I also looked at the info on the configuration fuses, and while it's pretty cool to be able have access to those, I'm positive I would just be digging my self a larger and more frustrating hole.
Any other ideas what could be the problem? I'm stumped.
Not that I know of.At least I don't think so. I tried another power supply(some aa's) , but to no avail. I'm wondering if the programmer is not setting the pin high as intstructed. Could this be a problem with the EPIC or perhaps a bad cable? Is there any way to test the programmer(or the chips for that matter) for a defect?
If anyone needs me, I'll be staring blankly at this breadboard with with contempt.
Thanks,
Shawn
Hi, Shawn
Did you also think to tie the MCLR pin to V+ ???
some details about Hardware are not too much nor ... YOUR scheme will be perfect.
...
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 " !!!
*****************************************
Bookmarks