[Sussex] A Little Hardware Help

Desmond Armstrong desmond.armstrong at gmail.com
Sat Jun 6 22:17:33 UTC 2009


Al Bennett wrote:
> Hi Steve
>
> (If you'll forgive an interruption from an ex-regular now north of the 
> border!)
>
> The 16F628 is a good choice to start with, I've played with them in the 
> past (but if you're not too invested in PICs my personal favourite is 
> the Atmel AVR series as there's excellent open source compiler (eg GCC) 
> and toolchain support).
>
> Do you have a multimeter?  If so, check your supply is giving +5 (+/- 
> half a voltish) with respect to ground.  If it's ok then you've excluded 
> that problem, just make sure you have the polarity right.  If not (or 
> you don't have a meter and want to guarantee a good supply), a 7805 is 
> the bullet proof, old school, piece of cake solution.  The circuit on 
> this page is what you need:
> http://www.tkk.fi/Misc/Electronics/circuits/psu_5v.html
>
> You may find the 7805 advertised with extra letters in the part number 
> (LM7805, 78S05 etc) but it should be widely available (Maplin, Rapid 
> Electronics et al).
>
> Start with illuminating an LED using the micro, then flash it on and off 
> (the microcontroller "hello world") before moving on.
>
> Basic things to check:
> - Fuses / oscillator configuration (if you're using the internal osc 
> make sure it's enabled via the fuses, if you're using an external 
> resonator make sure it's hooked up correctly (with caps for two pin 
> resonators))
> - Check your reset pin (MCLR) is pulled high (through a 10k should do)
> - Port direction settings (make sure your outputs are outputs)
> - Output port set to whatever "on" is (if you're sourcing current it 
> needs to be high, sinking current low)
>
> The struggle is always getting an LED to blink, once you're that far 
> things become a lot easier!
>
> Hope this helps, feel free to contact me offlist if you want.
>
> Al
>
>
> Steve Dobson wrote:
>   
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hi All
>>
>> I've been a software engineer for the 30 years, but I now find that I
>> want to learn a little hardware too complement it.  Computers are only
>> useful (fun) when the are doing something.  And being able to physically
>> interact with the world around them is an area I would like to explore -
>> just for fun you understand.
>>
>> To that end I've started playing around with the PIC16F628 [1]
>> micro-controllers - a small but complete computer on an IC.  I also
>> found a nice set of hardware & software tutorials [2] to learn from and
>> have bought some breadboarding hardware to play with.  My first goal is
>> to get the PIC to control a seven segments display (common anode) and to
>> that end I have built a simple circuit[3] based on the main board [4].
>> Unfortunately my first attempt doesn't work!  :-(
>>
>> If I remove the IC and jumper the -ve line to the seven-segment display
>> lines then the LEDs light up - so that part appears correct - and it
>> matches the circuit in the tutorial [5], although as I have a single
>> digit seven-segment display I have connected the 8 pins of the PIC to
>> the 8 inputs (seven segments + decimal point) of the display and omitted
>> the transistor parts.
>>
>> I guess that the problem lies in the power input to the chip.  I'm using
>> a Bandridge BE-516 mains transformer (regulated) to provide the power,
>> but do I need any form of circuit on this supply, and if I do what?  Of
>> course I am completely clueless at this point as to how to find out what
>> is wrong.  I know the PIC isn't blown because if I place it back in the
>> programming/test board it works there perfectly.
>>
>> Any and all help gratefully welcomed.
>>
>> Steve
>>
>> [1] http://ww1.microchip.com/downloads/en/DeviceDoc/40300C.pdf
>> [2] http://www.winpicprog.co.uk/pic_tutorial.htm
>> [3] http://www.syscall.org.uk/simple-circuit.jpg
>> [4] http://www.winpicprog.co.uk/pic_tutorial_main_board.htm
>> [5] http://www.winpicprog.co.uk/pic_tutorial_7seg_board.htm
>> [6] http://www.superfi.co.uk/index.cfm/page/moreinfo.cfm/Product_ID/1023
>>
>>     
Do remember that your chosen PIC requires 2.0 volts not 5v so hence my 
recommendation of 7802 or 78L05 (low power)



More information about the Sussex mailing list