I am trying to program 12F675 with MICROCHIP´s PICKIT1 (flash starter). Absolute newbie (learning the data sheet right now ).
The MCU is used to do the following tasks:
1) Obtain sensor reading (3 sensors) and use the embedded multichannel 10 bits A/D converter. A timer (watchdog?) is used to read each channel during certain period of time. When timeout event occurs, switch to a different channel.
2) Since MCU will grant each sensor (A/D input) certain amount of time, it should store multiple reading and take the average value. I think I will use weighted average to save memory space.
3) After obtaining all sensor readings (three 10bits numbers), the MCU should recombine them (concatenate) and calculate the 16bits CRC number.
I found some codes for CRC16, probably it is the hardest part. Those algorithms have more than 80 instructions, since the memory in this kind MCU is very limited, I wonder if I would be able to store the program and generated data at the same time.
I also have to decide whether to use MPLAB and a C compiler for the programming. I have experiences with C, but only programmed in assembly with 68K.
I think what I need to do is not too bad. There should be sample codes that I can reuse for this project... Any help will be greatly appreciated.
Bookmarks