In case you're wondering how the LED manages to be on despite there being no power applied, it's actually off. What you're seeing is the camera's flash being reflected!
| blink18f45k50.x.zip |
|
I breadboarded a minimal PIC18F45K50 circuit. The LED in the circuit was added to so I can test a minimal "blink the LED" app. This minimal circuit does not yet include the USB connector, nor powering via the USB bus. However, it does interface properly to the PICkit 3 programmer (via the 6-pin male header to lower left of IC, rows 21-26 of breadboard), and I was able to blink the LED and set up breakpoints from the MPLAB X IDE. In case you're wondering how the LED manages to be on despite there being no power applied, it's actually off. What you're seeing is the camera's flash being reflected! Added 2/25/2014: In response to comment from hoylegj, here is a zip file of the source. Really just a few lines in main.c, plus changing the default auto-generated configuration settings in configuration_bits.c to use the internal oscillator.
6 Comments
hoylegj
2/24/2014 03:59:26 am
would you have the code, I'm trying to do the same and failing
Reply
VccGnd
2/24/2014 07:15:05 pm
Hi hoylegj:
Reply
hoylegj
2/25/2014 06:31:35 am
Your a star, many thanks works a treat, Now I can work out what I've been doing wrong. thanks again, Geoff
Reply
hoylegj
2/26/2014 07:39:01 pm
Hi VccGnd, may I ask a silly question.. I'm missing something basic I think, we set TRISA to 0 (output all ports), we xof 0x10 so bit 4 is either 1 or 0. now, I keep looking at this and don't understand, 0x10 should set bit 4 and this should be RA4 (pin 6), but we are trigging RA0, (pin 2) and that should be 0x1, what am I missing?
Reply
hoylegj
2/27/2014 03:35:56 am
I was having a bad day, lost the pot, all ok now :-) thanks
Reply
VccGnd
2/27/2014 06:14:57 am
Glad to hear all is okay now :-) Leave a Reply. |
VccGnd
Hardware with a software twist. Archives
February 2014
Categories
All
|
||||||