Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

IC Newbie

Status
Not open for further replies.

G-wiz

New Member
Ok i'm starting to realise that lot's of idea's i have can be easily made with the use of IC's. And it seems that a PIC Microcontroller is a popular choice.

I've looked at some PIC beginner kit's as i'm a little clueless to say the least. Can anyone point me in the right direction please.

I have some silly Q's too. Most of the circuits I want to build will be used where there is a 12v supply, can i just use a zener diode to reduce voltage to supply the IC's and circuit ?

I am only guessing at the mo that a PIC is the right choice, as i'm not sure what IC's are available and what they would do, If i give some examples of circuits i'd like to design and build perhaps someone can get me on the right track.

Servo controller:

I'd like to use a servo to control a choke operation on the carbs on my bike, although i have found a circuit using a 555 chip i wonder if there is a better way to do this ?

Temp display:

Looking at the use's of the 555 i'm wondering if i can use the temp sensor already fitted to my bike, which is just a variable resistor the changes with temp. Using the change in resistance and a 555 I could create a varying frequency signal. Could this be sent to a PIC to then light up LED's as temp rises. Also at a preset temp could i activate the servo above to work as an electronic auto choke ?

Rev counter:

Think i might be biting off more than i can chew, but maybe i could start with an LED rev counter ?

Am I gonna come across problems if all signals are not digital, i.e. sine wave rather than square wave. Ok i know i've far to many Q's but my heads doing circles now and i want to learn this stuff.................

HELP PLEASE !!!!!!!!!!!!

Thanks all

Glen
 
PICs are a good choice but there are tons of microcontrollers to choose from. Some popular hobbiest micros are: Atmel's AVR, Zilog's Z8Encore, and various 8051s. I've heard good things about Zilog's Z8Encore kit that's only $39. All microcontrollers are fairly similar it's mostly personal preference and what people have experience with. I'd recommend buying a kit - it will make your learing experience much more plesant and productive.

The supply voltage question: There is an IC called a voltage regulator that will take an input like 12V and output 5V. There are tons of regulator ICs for almost any output voltage you could want.

If you have a micorcontroller you don't really need a 555 timer - micros have digital timers and PWM generators that can accomplish the same function but in a much more controllable way.

A device called an Analog to digital converter (ADC is a common abreviation) lets you take an analog voltage and turn it into a digital number that represents that voltage. A lot of micros have built in ADCs that would be perfect for reading the analog voltage from your temperature sensor. There is also a device called a Digital to Analog converter that takes a digital number and outputs a analog voltage. These are less common on microcontrollers.
 
G-wiz said:
Ok i'm starting to realise that lot's of idea's i have can be easily made with the use of IC's. And it seems that a PIC Microcontroller is a popular choice.

I've looked at some PIC beginner kit's as i'm a little clueless to say the least. Can anyone point me in the right direction please.

Have a look at my tutorials!.

I have some silly Q's too. Most of the circuits I want to build will be used where there is a 12v supply, can i just use a zener diode to reduce voltage to supply the IC's and circuit ?

Use a 7805 or 78L05 regulator, again see my tutorials.

I am only guessing at the mo that a PIC is the right choice, as i'm not sure what IC's are available and what they would do, If i give some examples of circuits i'd like to design and build perhaps someone can get me on the right track.

Servo controller:

I'd like to use a servo to control a choke operation on the carbs on my bike, although i have found a circuit using a 555 chip i wonder if there is a better way to do this ?

A PIC could do this easily, it's quite simple to get them to operate servos, a simple google for '+pic +servo' will find plenty of hits. A small 8 pin PIC (555 size) would be fine.

Temp display:

Looking at the use's of the 555 i'm wondering if i can use the temp sensor already fitted to my bike, which is just a variable resistor the changes with temp. Using the change in resistance and a 555 I could create a varying frequency signal. Could this be sent to a PIC to then light up LED's as temp rises. Also at a preset temp could i activate the servo above to work as an electronic auto choke ?

You don't need a 555, simply read the sensor with the PIC - either using a PIC with an A2D inside, or a capcitor charging method - again, see my tutorials.

Rev counter:

Think i might be biting off more than i can chew, but maybe i could start with an LED rev counter ?

It's fairly straight forward, again a google search will probably find you plenty of hits.

Am I gonna come across problems if all signals are not digital, i.e. sine wave rather than square wave. Ok i know i've far to many Q's but my heads doing circles now and i want to learn this stuff.................

It's not a problem, it's easy to make a sine wave square, depending on the amplitude of it you might only need a resistor feeding the PIC pin!.
 
Might be easiest to first know what programming languages you know. I am fluent in C but not assembler so I bought the Atmel STK500 kit because their C compiler is free and the kit cost $79. Motorola's free C compiler is only good for 4k programs. The larger compiler is $1500. PICStart's was $200 and you have to buy adapters that cost $129 and up. Get a Digi-Key catalog and look through.
Most of what you want to do can be done with discrete parts. R/C servos use input pulse trains with widths from 1.5 - 0.5 seconds wide. A voltage to frequency converter can change the temperature voltage to a servo pulse.
Using a micro-controller you can modify things quicker over unsoldering/resoldering parts. Plus, you can but one capable chip for experimenting, then buy the cheapest chip to do the job.
 
magno_grail said:
PICStart's was $200 and you have to buy adapters that cost $129 and up.

I don't quite understand this comment?, the PICStart+ programs pretty well all PIC's, and doesn't require any adaptors. You can buy a hardware PIC emulator, which does use expensive adaptors - basically special silicon versions of each PIC.

But there are plenty of cheap PIC programmers (see my signature), you needn't spend more than 15 GBP on a kit for one.

As for language, it's essential you learn assembler - there's only 35 commands, and without a decent knowledge of assembler you can't effectively use a high level language.
 
Thanks for the response's, i've started to understand alot more already.

Thanks Nigel I started reading your tutorial last night. And i'm goona have a look at maplins & RS components, so i can start to have a play with a PIC then move onto designing and building the circuits i've mentioned !!

Thanks again, I'm sure i'll be back with more Q's soon !!!!!
 
"As for language, it's essential you learn assembler - there's only 35 commands, and without a decent knowledge of assembler you can't effectively use a high level language." - Nigel
Not sure why. I have programmed for years in BASIC, Fortran and C without ever using assembler. The whole point of a compiler is so you do not have to write a page of code just to do something as simple as multiplying two numbers together. Assembler will be faster because you know exactly what and where to move variables whereas a compiler is guessing what you want to do.
Opening a graphics window in SGI graphics takes about 5 lines. It takes two pages of Motif. I cannot imagine what it would be in assembler.
If for some reason I had to have the speed and could not get a faster chip then I might think about learning assembler. Until then it is time I do not have.
 
magno_grail said:
"As for language, it's essential you learn assembler - there's only 35 commands, and without a decent knowledge of assembler you can't effectively use a high level language." - Nigel

Not sure why. I have programmed for years in BASIC, Fortran and C without ever using assembler.

I wasn't aware that you could get FORTRAN for a PIC?.

In fact I'm sure you can't, so presumably you're taking about PC programming (or other 'full' computer systems).

This thread is about PIC's, and if you don't have a reasonable knowledge of assembler, and the PIC hardware, you can't write effective high level code. I've seen BASIC code written, taking many lines of BASIC code, generating who knows how much assembler when compiled, that (if you had a little assembler knowledge) you could do in one or two lines, of either assembler or BASIC.

By only using a high level language you're crippling your capabilities, many PIC's only have 1K of program space (or less), writing in BASIC, and knowing what you are doing, can achieve an incredible amount in that small amount of space.
 
I think magno_grail is just pointing out the advantages of high level languages and that the AVR has the best free high level language tools.

I think for a beginner there is no real advantage to using assember over C. Someone who is proficient in C but not assembler has a much greater chance of getting their controller to do what they want it to with C - even if it does take a ton of code space.

I learned to program micorcontrollers in C with no real knowledge of the underlying assembler. True my programs sucked but I don't think they would have been much better if I was writing in assembler. For beginners just getting something that will work is the most important thing - refinements can come later.
 
yes indeed high level languages have alot of advantages. it takes less time in developing the code and less frustration debugging the code. and if you have been comfortable with C in the past then you should definitely use C with microcontrollers.

but you should have a little bit of knowledge of assembler. the reason is that the code produced by a C compiler isnt that much code space efficient as an assembler. when you are writing in assembly you are more close to the hardware of the microprocessor. and by writing code in assembly you can save alot of code space.

this isnt about AVRs and PICs. if you go to the avrfreaks forum you will see that many people there also think that a little bit of knowledge of assembler is very helpful in programming embedded systems. and one thing more, PICs also have alot of high level language tools just like AVR. like the PICC compiler, the CSS compiler and the IAR compiler. the only difference is that you can get a free compiler for AVRs which isnt the case with PICs. but even then the free compiler for AVRs doesnt match the performance of the high end compiler from IAR.

and if you admit that by learning assembly you can refine you program then why not start learning it right now? its only 35 instructions, no pain at all.

i hope that helps
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top