??? 12/20/07 02:41 Read: times |
#148531 - Almost there .... Responding to: ???'s previous message |
The code for this animal is now waiting to be tested properly. The following portions are ready:
- The meter driver. Uses timer interrupt to greate 4 PWM signals - The input data into needle direction conversion. This was amazingly hard to do especially because the used MCU does not have any way to acceess data in the ROM (except for "load immediate"). This in turn made usage of a any sort of a table impossible. - The rotating switch read (also done in the interrupt) - The I2C state engine to communicate with master MCU. Remember, this replaces a LCD display so communication is needed ;) The coding for this MCU is really hard as the MCU does not contain any accessible RAM (only registers), it does not have any accessible stack (only 3 level HW stack) and because of this the depth of suroutine calls must be limited to 2 (1 reserved for IRQ). Oh man.... Obviously there is no C compiler for this ancient cocroach so my only option was to do this with pure bred assembler. For those that start staring me with that weird look in their eyes: I have 200 of these (Industrial grade) on my shelf and the number of I/O pins and the feature set of this MCU is exactly what was needed with this task. I will post the code when I have done some testing with it. |
Topic | Author | Date |
Interesting problem | 01/01/70 00:00 | |
Frequency? | 01/01/70 00:00 | |
400Hz | 01/01/70 00:00 | |
Yes they did | 01/01/70 00:00 | |
Hz, not hZ | 01/01/70 00:00 | |
Phase is easy | 01/01/70 00:00 | |
Syncro? | 01/01/70 00:00 | |
Ont the indicator one can clearly see | 01/01/70 00:00 | |
The schema, layouts and pictures are | 01/01/70 00:00 | |
OT: mail address | 01/01/70 00:00 | |
Sorry, missed that one. | 01/01/70 00:00 | |
what is the purpose of LEDs? | 01/01/70 00:00 | |
The purpose of the 4 leds | 01/01/70 00:00 | |
Antenna | 01/01/70 00:00 | |
Almost there .... | 01/01/70 00:00 |