By the way, that link should be
http://www.microchip.com/wwwproducts...cName=en010227
Sorry!
By the way, that link should be
http://www.microchip.com/wwwproducts...cName=en010227
Sorry!
ADCON1=2
This will set all pin to analog, hence why you experiment some problem
Try
ADCON1=7
This will disable all analog stuff.
100K for MLCR is tad high. Something <10K is more standard.
Double check your config fuses setting, INTRC, MCLR and LVP. LVP should be set to off.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Here's some handy links for you
PortA Doesn't Work
http://www.picbasic.co.uk/forum/showthread.php?t=561
Presetting Configuration Fuses (PIC Defines) into your Program
http://www.picbasic.co.uk/forum/showthread.php?t=543
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Thanks everyone for responding so fast with such detailed help!! I am at work now but will give these things a shot when I get home, including reading through the docs you linked to.
One question to Steve (mister_e) though: I thought what I was doing with going high and low out on the pin was analog out, no? Or am I confused about what analog/digital means in this case? Does analog give me a potential range of values vs. digital giving me just two (high/low a.k.a. on/off a.k.a. 0/1) values? As I write it out it seems more and more obvious to me...
So, I've read through the docs and things are starting to be much more clear, I'm understanding what is important in the data sheet vs. not. I think I'm almost there but what I'm seeing is the led going on once when I power up but then stopping. Does this sound familiar to any of you?
Thanks again for all your help--
Best,
Dave
Well this doesn't sounds familiar, unless the configuration fuses are not properly programed by your Device Programmer.
Program your PIC, read it back. See if the config fuses stay the same.
You could still post your .HEX file here (change the extension to .TXT), so we could try it world-wide![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
These are some of the configuration data that I 'embed' at the top of the source file to inform the programmer which fuses to set. This, of course, is for a PIC16F917. You will need to check which fuses apply for the 819 and set them accordingly.
Code:@ device pic16f917 @ device INTRC_OSC_NOCLKOUT,WDT_OFF,PWRT_ON,MCLR_OFF @ device PROTECT_ON,BOD_OFF,CPD_ON,IESO_OFF,FCMEN_ON define NO_CLRWDT 1 define OSC 4 ' OSCCON defaults to 4MHz on reset
Bookmarks