Archive for the ‘PIC’ Category

Using Nokia 3310 LCD as Display for PIC Projects

Monday, February 25th, 2008

Parts for older Nokia phones are very cheap and readily available nowadays. I have been toying around Nokia 3310 LCD and used it for some of my projects as display. I have created C routines to use them easily and want to share it to everyone. The files are lcd3310.c and lcd3310.h. The LCD pinout, when looking at the back with the connectors on top starting from left to right, are VDD, CLK, DATA, D/C, CE, GND, VOUT and RESET.

Interrupt Driven Serial Routines with Circular FIFO for PIC Micro

Saturday, December 29th, 2007

This is another routine that I want to share. This is the Interrupt Driven Serial Routines with Circular FIFO for PIC Micro. This routine uses the PIC’s hardware USART. Since this is unbuffered, so I added a software FIFO. The FIFO management is quite lean and fast but required the size of the buffer to be power of 2 (2^x). This is because FIFO roll-over uses bit-wise AND of (buffer_size - 1). This reduces code size due to that no more conditionals to test pointers overflowing the buffer.

Tiny Threads - Tiny Multitasking Threads for Microcontrollers

Thursday, December 27th, 2007

For the efficiency and performance conscious C programmers, here is my tiny cooperative multitasking engine.

This was made for PIC16F micros that has a very small available flash for code and ram/memory. But this can be used also for other processors because I tried to make it ANSI compliant. For the PIC16F processor, this uses only 1 byte RAM needed per thread and compiles to a very small overhead context switching.

My PIC Microcontroller Code Snippets Page

Thursday, December 27th, 2007

These code snippets are for PIC Microcontroller (PIC16F Family) that I have posted in the PICLIST mailing list over many year. I have only compiled few of my posts. They are located/downloaded here. Please free to use them on your embedded projects.