Code and Documents

Sorry I used multiple sites to store code, trade it between computers, etc. I like pastebin and have used github. If you can’t find it here and you’ll looking for it contact me directly.

Much of my new code and snippets end up on http://pastebin.com/u/chasxmd . I’ll try to keep this page updated but I doubt I’ll drop anything less than a full blown project here.

Files with potential updates can be found at github: https://github.com/chasxmd and NOT here.

All related files I’ve uploaded and code:

CODE:

Right click and Save As…

All files will have target device included in the file name. They’re either in C (.c) or assembly (.asm). For development I use the Microchip XC8 C compiler.

16F1509_NCO.c
XC8 C based numerically controlled oscillator (NCO)

16F628A_WWVB_generator.asm
This code tests “atomic” clocks that take their signal from WWVB by broadcasting the time code in ASK (OOK). It’s written in assembler but writing it in C from scratch would be a breeze.

16F1509_PWM.asm
Assembly code for basic PWM operation

 16F1509_rotary_encoder.asm
Assembly code for basic rotary encoder use. Output is dumped as an 8bit integer to a port.

OTHER:

Leave a Reply