PIC 12F1822 programs

jpanhalt

Joined Jan 18, 2008
11,087
It is similar to the 12F1840 and 16F1829, both of which I use as my first choices and with Assembly only. What problem are you having?

John
 

Thread Starter

MaxHeadRoom

Joined Jul 18, 2013
27,659
John Thanks.
I have got used to the 18f without all the banksel/bank switching.
Essentially what I am doing is using the FOSC set to 32.768Khz to run to time out TMR1 with various time setting up to 1 sec.
and interrupted by either the T1 roll over or a interrupt on input, which ever comes first.
The program does not require a H.S. FOSC operation
I seem to have got the FOSC running at 32Khz by way of a LED Flash test.
I don't seem to be getting an interrupt, I intend doing a bit more testing today, if I get stuck, I will come back with the code if you don't mind looking it over.
In the mean time any known tips or hints would be appreciated.
Max.
 

jpanhalt

Joined Jan 18, 2008
11,087
The biggest gotcha I can think of is to be sure the oscillator is running. You can output it to a pin or do hardware simulation (only 1 breakpoint). An LED ,as I use it, just assures the code is past or at a certain point. Are you using a crystal?

John
 

Thread Starter

MaxHeadRoom

Joined Jul 18, 2013
27,659
I am making headway. By OSC I take it you mean the system clk? Yes I have it running at 32Khz and verified by time delay switching a LED.
Am working on the interrupts at present. But seem to have success a moment ago with TMR1 rolling over at 1 sec off of the system clock, so it is just the INT on Input now to get down now.
Otherwise it seem a nice little μp.
Max.
 
Top