Book Suggestions About Micro-controllers

In summary, the PIC microcontroller is a versatile and powerful tool that can be connected to a variety of circuits. There are plenty of resources available online, including application notes on the Microchip website, for learning about how to use the microcontroller. For those interested in programming, there are many books and online sources that can teach you the necessary concepts.
  • #1
Zalajbeg
78
3
Hi everyone,

I want to learn about micro-controllers especially PIC. My priorities are below:

1) I want to learn how a circuit is built. What are the logics to add capacitors, resistors, transistors etc. ?

2) How can the required capacity for capacitors or resistances of resistors be calculated?

I will focus on programming later.

Could you suggest me books, documents, online sources etc?
 
Engineering news on Phys.org
  • #2
Zalajbeg said:
Hi everyone,

I want to learn about micro-controllers especially PIC. My priorities are below:

1) I want to learn how a circuit is built. What are the logics to add capacitors, resistors, transistors etc. ?

2) How can the required capacity for capacitors or resistances of resistors be calculated?

I will focus on programming later.

Could you suggest me books, documents, online sources etc?

There should be plenty of application notes at the Microchip website (they make the PIC microcontrollers).
 
  • #3
(1) What kind of circuit? Microcontrollers can be connected to a very wide range of different circuits, however, the circuits have nothing to do themselves with the microcontroller.

(2) What capacitance and resistance?

In general: MicroControllers give us the possibility to process information obtained from a given circuit. For example, in an application I am working on now, a bicycle ergometer is required to adjust the tension of a braking band automatically, in order to ensure that the person on the bike is constantly providing a given power output (Work).

I use the MicroController for several things:
- Communication to a serial interface on a computer using UART
- Digital measurement of the flywheel speed inside the bicycle (via an optocoupler inside the bike)
- A/D conversion of an analogue signal from a torque sensor
- Controlling a motor driver chip for a step motor (the motor controlling the braking band strength)
- Reading digital inputs from security checks inside the bike (making sure the step motor doesn't go beyond some limits)

These are all the interfaces to the circuits outside the MicroController. How these interfaces are implemented have nothing to do with the MicroController and thus, no book on microcontrollers can teach you how this is done.

I use OpAmps for buffers and signal amplification. And I use capacitors for filtering the signals.

But this is all analogue electronics, and I learned how to do this from analogue signal processing. The UART communication is simply just wires, and needs no extra things.
All I have done MicroController-wise with capacitors is to add them to the supply voltages as decoupling, which is kinda also analogue electronics.

As a final note, I don't believe there are any books about microcontroller circuits, since there are not "general uC circuits". MicroControllers can be used in almost any kind of circuit.

There is actually only one thing to learn about MicroControllers, and that is how to program them.

This post got a bit bigger than expected. Well, hope it gives a bit of perspective on stuff, maybe also for other people.
 
  • #4
Runei said:
(1) What kind of circuit? Microcontrollers can be connected to a very wide range of different circuits, however, the circuits have nothing to do themselves with the microcontroller.

(2) What capacitance and resistance?

In general: MicroControllers give us the possibility to process information obtained from a given circuit. For example, in an application I am working on now, a bicycle ergometer is required to adjust the tension of a braking band automatically, in order to ensure that the person on the bike is constantly providing a given power output (Work).

I use the MicroController for several things:
- Communication to a serial interface on a computer using UART
- Digital measurement of the flywheel speed inside the bicycle (via an optocoupler inside the bike)
- A/D conversion of an analogue signal from a torque sensor
- Controlling a motor driver chip for a step motor (the motor controlling the braking band strength)
- Reading digital inputs from security checks inside the bike (making sure the step motor doesn't go beyond some limits)

These are all the interfaces to the circuits outside the MicroController. How these interfaces are implemented have nothing to do with the MicroController and thus, no book on microcontrollers can teach you how this is done.

I use OpAmps for buffers and signal amplification. And I use capacitors for filtering the signals.

But this is all analogue electronics, and I learned how to do this from analogue signal processing. The UART communication is simply just wires, and needs no extra things.
All I have done MicroController-wise with capacitors is to add them to the supply voltages as decoupling, which is kinda also analogue electronics.

As a final note, I don't believe there are any books about microcontroller circuits, since there are not "general uC circuits". MicroControllers can be used in almost any kind of circuit.

There is actually only one thing to learn about MicroControllers, and that is how to program them.

This post got a bit bigger than expected. Well, hope it gives a bit of perspective on stuff, maybe also for other people.

Runei, thank you very much for your information. Firstly I have intended to control LEDs lighting or not lighting in different moments. I also want to add switch buttons as inputs. I can handle the output ones but I don't know how to give a logic 0 or 1 to the inputs.

I also want to know about the circuits outside the microcontrollers. If you say it is the area of analogue electronics I can investigate it.

Thanks again for your information.
 
  • #5
Inputs: If you want to read digital inputs with a MicroController, such as if a button is pressed or not, we use the pins on the MicroController called the GPIO pins (General Purpose Input/Output). These can be set up as inputs or outputs or in some cases both (this depends on the MicroController and setting them up is done in software).
The "logical 1" is many times given by 3.3 if we are using CMOS standards. Looking in the MicroController datasheet you will be able to find the "logic level standard" that the input and output pins use.
A lot of times what you want to do is to use a pull-up resistor to 3.3 volts and then if the button is pressed, the input in is shorted to ground. This way the input pin will be an "active low" (meaning the signal will be a logic "0" when we press the button). However on could also use a voltage divider or perhaps some other scheme in order to create the logic levels.

A good guideline is to say that 3.3 is a logic 1 and a 0 is a logic 0.

EDIT: But also, as Berkeman says, I believe that if you look at the application notes, you will get an idea of how you design different circuits.

http://www.microchip.com/wwwcategory/TaxonomySearch.aspx?show=Application Notes&ShowField=no
 
  • #6
Runei said:
Inputs: If you want to read digital inputs with a MicroController, such as if a button is pressed or not, we use the pins on the MicroController called the GPIO pins (General Purpose Input/Output). These can be set up as inputs or outputs or in some cases both (this depends on the MicroController and setting them up is done in software).
The "logical 1" is many times given by 3.3 if we are using CMOS standards. Looking in the MicroController datasheet you will be able to find the "logic level standard" that the input and output pins use.
A lot of times what you want to do is to use a pull-up resistor to 3.3 volts and then if the button is pressed, the input in is shorted to ground. This way the input pin will be an "active low" (meaning the signal will be a logic "0" when we press the button). However on could also use a voltage divider or perhaps some other scheme in order to create the logic levels.

A good guideline is to say that 3.3 is a logic 1 and a 0 is a logic 0.

EDIT: But also, as Berkeman says, I believe that if you look at the application notes, you will get an idea of how you design different circuits.

http://www.microchip.com/wwwcategory/TaxonomySearch.aspx?show=Application Notes&ShowField=no

Oh! It has really made my ideas clearer. Even though I get some answers on a scheme in another topic I didn't manage to understand why the input is shorted to ground.

You can see the scheme here:

https://www.physicsforums.com/showthread.php?t=686195

In this scheme I think when the button is pressed input signal will be a logic "1" and when it is not the signal will be logic "0". I thought some current would flow through inputs but if I understand right the input gets signal according to the voltage.

I have two more questions. If there are no pull down resistors in the scheme;

1) Wouldn't the input signal be logic "1" when the button is pressed because it would measure 5V?
2) Wouldn't the input signal be logic "0" when the button is not pressed because it would measure nothing?

If no why?
 
  • #7
What is described in that other thread is a "pull-down" instead of "pull-up". You either pull the pin up to a voltage or down to ground, through a resistor, and then you use a switch to short it to the opposite when the switch is activated.

To your questions:

(1) It would measure 1 because of 5 V when the button is pressed down, that is correct.

(2) When no connected to ground it would "probably" show a 0. The problem is, the input pin is what we call "floating", meaning it is not connected to any ground or voltage. This is bad, because "floating" wires are very susceptible to noise from everywhere. So if you took an oscilloscope and looked on the pin, you would see that the voltage was fluctuating up and down all the time. This means that sometimes you COULD see a voltage spike high enough to trigger the logical "1", and depending on what your MicroController is programmed to do, bad things could happen.
 
  • #8
For PIC 18 architecture and programming using Assembly and C, I would just point at Mazidi's, Mckinlay's and Causey's PIC Microcontroller and Embedded Systems book. I have a microcontroller course this semester and we have this book as the reference. I have to admit that it's one of the best books that I have encountered in electrical engineering. It's very suitable for a student, a hobbyist and even for an experienced engineer.
 
  • #9
Runei said:
What is described in that other thread is a "pull-down" instead of "pull-up". You either pull the pin up to a voltage or down to ground, through a resistor, and then you use a switch to short it to the opposite when the switch is activated.

To your questions:

(1) It would measure 1 because of 5 V when the button is pressed down, that is correct.

(2) When no connected to ground it would "probably" show a 0. The problem is, the input pin is what we call "floating", meaning it is not connected to any ground or voltage. This is bad, because "floating" wires are very susceptible to noise from everywhere. So if you took an oscilloscope and looked on the pin, you would see that the voltage was fluctuating up and down all the time. This means that sometimes you COULD see a voltage spike high enough to trigger the logical "1", and depending on what your MicroController is programmed to do, bad things could happen.


I understand. I have to short it to the ground because I don't want the pin to be affected by the environmental. I think I can do the rest (calculations etc. ) with the analogue electric knowledge. Thank you very much for your nice explanations.

@Abstr7ct: Thank you for your suggestion I will try to find it and have a look.
 
  • #10
Zalajbeg said:
I understand. I have to short it to the ground because I don't want the pin to be affected by the environmental. I think I can do the rest (calculations etc. ) with the analogue electric knowledge. Thank you very much for your nice explanations.

No you have to connect it through the resistor to ground (pull-down) or to the supply (pull-up). When the switch is pressed, there will be a short to either supply or ground. When the switch is not pressed, we need to make sure that it goes the opposite way.

Pull-down:
- Switch pressed => Short to voltage
- Switch not pressed => Will be "pulled" to ground through the resistor

Pull-up:
- Switch pressed => Short to ground
- Switch not pressed => Will be "pulled" to voltage through the resistor
 
  • #11
Runei said:
No you have to connect it through the resistor to ground (pull-down) or to the supply (pull-up). When the switch is pressed, there will be a short to either supply or ground. When the switch is not pressed, we need to make sure that it goes the opposite way.

Pull-down:
- Switch pressed => Short to voltage
- Switch not pressed => Will be "pulled" to ground through the resistor

Pull-up:
- Switch pressed => Short to ground
- Switch not pressed => Will be "pulled" to voltage through the resistor

Yes, I just talked about the example, but may be with wrong words. I have totally understand the logic behind the circuit now. Thank you very much for your explanations. I think I am able to set up some simple circuits now.

Further, I will research analogue electronics and some programming. Your comments helped me a lot!
 

Related to Book Suggestions About Micro-controllers

What are micro-controllers?

Micro-controllers are small electronic devices that consist of a microprocessor, memory, and input/output peripherals all on a single integrated circuit. They are used to control and automate various processes in electronic devices.

Why are micro-controllers important in the field of electronics?

Micro-controllers are important because they provide a compact and cost-effective solution for controlling and automating electronic devices. They are widely used in various applications such as industrial automation, consumer electronics, and medical devices.

What are some common applications of micro-controllers?

Micro-controllers are used in a wide range of applications such as controlling home appliances, operating drones, monitoring and controlling industrial processes, and even in medical devices such as pacemakers and insulin pumps.

What are some popular micro-controller brands?

Some popular micro-controller brands include Arduino, Raspberry Pi, PIC, and STM32. These brands offer a variety of micro-controllers with different features and capabilities to suit different needs and projects.

What are some good resources for learning about micro-controllers?

There are many resources available for learning about micro-controllers, such as online tutorials, books, and community forums. Some popular books on micro-controllers include "Make: Electronics" by Charles Platt and "Programming Arduino: Getting Started with Sketches" by Simon Monk.

Similar threads

  • Electrical Engineering
Replies
7
Views
1K
  • Electrical Engineering
Replies
3
Views
1K
  • Electrical Engineering
Replies
26
Views
3K
  • Electrical Engineering
Replies
5
Views
3K
  • Electrical Engineering
Replies
3
Views
868
  • Electrical Engineering
Replies
2
Views
1K
  • Electrical Engineering
Replies
6
Views
1K
  • Sci-Fi Writing and World Building
2
Replies
48
Views
4K
  • Electrical Engineering
2
Replies
41
Views
4K
Replies
5
Views
2K
Back
Top