16F877A - MicroChips. PIC programming.

Posted in Electronics, Programming by sandaruwan on June 22nd, 2006

Last few days, I was busy with programming a PIC. First, I downloaded some documents from Microchip site, and played around it bit. Then, I created some sample programs using assembler; even though I’ve prior experience with assembler, I found that it is not efficient enough as in man power. So, I decided to go for PIC Basic. Whoa! That seems to be nice, easy to code with it’s built in functions such button debouncing, etc.

The first effort of programming didn’t workout, because of the serial cable, after fixing the cable; it was the circuit. Lots of debugging fixed the circuit. WOW! It works.

I wanted to do some floating point operations. Since, the PIC basic compiler doesn’t handle the floating point operations itself, I decided to multiply the numbers by 1000, do calculation and divide them again. But multiplying the number by 1000 overflows the 16 bits word variable. So, I downloaded an external library, worked nice so far, but haven’t tried out it on the PIC yet.

Just wondering, is there a PIC Basic compiler for linux?

Leave a Reply