I have the pic 16f84A-04 micro controller. I built the "El Cheapo" programmer that came with my "Programming and Customizing PICmicro Microcontrollers" book.
After successfully burning the chip, I went to go test it. I connected all that i needed, and it wouldn't do anything. I tried to get a freq reading of the clock input from the crystal, but I couldn't get anything to read on my dmm. Is there some special way to measure frequency from a crystal?
I was wasting too much time getting nothing done and I started to try stuff. in the end, i just have one 6.8k resistor going into CLKIN. I know it is not the way it should be setup, but it sorta works now. i measured about 1Mhz at CLKIN now.
now that i have my temporary clock working (since the crystal didn't want to work) my program runs.
it only goes so far and then resets.....
I checked and double checked that I had WDT off. I simulated my program in MPLAB and I made sure I had this in my program from the start:
__CONFIG _CP_OFF & _WDT_OFF & _XT_OSC & _PWRTE_ON
Just for the hell of it, I included a clrwdt line in my program and reburned the chip. Well now it works as desiged! It seems that for some reason, the config isn't being correctly written to the chip, and the wdt is being left enabled, even though I had to set to be off.
anyone have any ideas on how to get the config to be setup correctly?
also, do you think that since the config isn't being correctly setup, that the osc is not changing to an external crystal mode, and that is causeing my first problem?
Thanks in advance for any help.
Steve
After successfully burning the chip, I went to go test it. I connected all that i needed, and it wouldn't do anything. I tried to get a freq reading of the clock input from the crystal, but I couldn't get anything to read on my dmm. Is there some special way to measure frequency from a crystal?
I was wasting too much time getting nothing done and I started to try stuff. in the end, i just have one 6.8k resistor going into CLKIN. I know it is not the way it should be setup, but it sorta works now. i measured about 1Mhz at CLKIN now.
now that i have my temporary clock working (since the crystal didn't want to work) my program runs.
it only goes so far and then resets.....
I checked and double checked that I had WDT off. I simulated my program in MPLAB and I made sure I had this in my program from the start:
__CONFIG _CP_OFF & _WDT_OFF & _XT_OSC & _PWRTE_ON
Just for the hell of it, I included a clrwdt line in my program and reburned the chip. Well now it works as desiged! It seems that for some reason, the config isn't being correctly written to the chip, and the wdt is being left enabled, even though I had to set to be off.
anyone have any ideas on how to get the config to be setup correctly?
also, do you think that since the config isn't being correctly setup, that the osc is not changing to an external crystal mode, and that is causeing my first problem?
Thanks in advance for any help.
Steve