Using a digital pot for LEDs (i.e. varying the current) isn't the way to go with LEDs. Sure, it'll work, but the results won't be very linear at the lower light levels. Best bet with an LED is to use PWM of some sort of another. If you look at the datasheet for whatever LED you've got, you'll notice that the color/intensity/etc are all referenced to a normalized current drive (or at least a range of current). Go outside of that range and the performance drops. If you use PWM, you drive the LED at an efficient level, with a varying duty cycle. And it saves power too...
As far as the FLASH in the 12F519? I didn't realize it was 64 bytes of FLASH either, I thought it was EEPROM. I don't have a 519 handy, and I haven't tried it either, so I don't know if PBP supports it in the same way it supports the other PICs with EEPROMs or not. You might end up writing an assembly subroutine to handle read, modifying, and re-writing the FLASH in 8 byte rows.





Bookmarks