[sdiy] PIC basic setup?

Tom Wiltshire tom at electricdruid.net
Thu Jan 9 17:53:00 CET 2014


Hohoho. Yep, been stung by that one too. O'scope is your friend.

The worst part of getting started with PICs is doing the initial set-up when you've no idea what's what, or what's going on. It's impossible to debug a chip that isn't even running! 
Once you've got even some basic boilerplate code that gets the chip awake and running, then you can start to tweak and if it breaks, you know not to tweak *that* bit again! I'd recommend finding some simple code example and seeing if you can start from there, rather than starting from absolute scratch, even if there's plenty of stuff in it that you don't understand. Gradually as I've gone along I've been able to fill in more of the blanks, but I had no clue at first.

HTH,
Tom

PS: Jack, if you have any specific questions when you get to my VCADSR, drop me a line.

On 8 Jan 2014, at 16:12, rburnett at richieburnett.co.uk wrote:

>> Any good ideas/tutorials for getting a PIC working with just a basic setup
>> (pic, xtal, maybe 5v regulator), making it blink an LED, respond to a pot,
>> etc?
> 
> Also when you get to programming the LED to flash on and off, make sure you include delays that wait long enough for the on and off times, so that the overall flashing speed is slow enough for you to actually see!
> 
> With a micro that can execute tens of millions of instructions per second it's easy for beginners to end up with the LED flashing at many kHz where it just looks like it is always on.
> 
> You can always check the I/O pin activity with an oscilloscope to see if it is toggling, but it's best to aim for a flash rate of around 1Hz from the outset.  If you end up getting something slightly faster or slower you can always measure it with a stopwatch and then try to work out where you went wrong!
> 
> Good luck,
> 
> -Richie,
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at dropmix.xs4all.nl
> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy




More information about the Synth-diy mailing list