Tuesday, July 29, 2008

Note for PIC16F887

From now on, my projects will be using PIC16F887 as the default microcontroller. As it is cheaper than the PIC16F877A and of course, it's newer.
Here, I'd like to document some configurations of the PIC16F887 for simple projects that don't relate to A/D conversion: (I'm no expert but the settings here are working for me)
- ANSEL = 0x00; // Make Digital I/O for PORTA (default is analog I/O), this is a must for input buttons, keys or whatever digital input/output
- ANSELH = 0x00; // Make Digital I/O for PORTB, this is a must otherwise the behavior of the ports will be unexpectable
- OSCCON = 0x75; // 8MHz Internal Oscillator , consumes more power
Or
- OSCCON = 0x65; // 4MHz Internal Oscillator , consumes less power

Timer1 Module Settings
- T1CON = 0x8F; // TMR1 Prescaler 1:1 external clock
- INTCON = 0xC0; // Set GIE, PEIE
- TMR1H = 0x80;
- TMR1L = 0x00;
- Delay_ms(10); // Delay for setting up TMR1
- PIE1.TMR1IE = 1; // enable interupt

Note: Microcontroller Devices are very sensitive to noise. Ground Plane and Noise Decoupling capacitor at power source may be needed.

Saturday, July 12, 2008

Vintage Electronics Related Magazines

There is a big collection of vintage electronics related magnazines at http://www.swtpc.com/mholley/magazines.htm .
Woww.. there were projects about stopwatches that could measure millisecond in 1968 (40 years ago).
I'm talking about these 2 projects.
- Build Ultra-Fast Electronic Stopwatch
- Build the Sports Timer

Nixie project was there too.
- All-Purpose Nixie Readout