Introduction to microcontrollers by Gridling G.

By Gridling G.

Show description

Read or Download Introduction to microcontrollers PDF

Best microprocessors & system design books

Designing Embedded Systems with PIC Microcontrollers: Principles and Applications

This e-book is a hands-on advent to the rules and perform of embedded procedure layout utilizing the PIC microcontroller. full of valuable examples and illustrations, it offers an in-depth remedy of microcontroller layout, programming in either meeting language and C, and contours complicated subject matters comparable to networking and real-time working structures.

Logic and Language Models for Computer Science

This article makes in-depth explorations of a vast diversity of theoretical issues in laptop technology. It plunges into the purposes of the summary strategies to be able to confront and tackle the skepticism of readers, and instill in them an appreciation for the usefulness of conception. A two-part presentation integrates common sense and formal language—both with purposes.

Additional resources for Introduction to microcontrollers

Sample text

If the clock signal is slower than required, the conversion will become unnecessarily long, but there should be no adverse effects on the conversion result. If the clock signal is too fast, however, the accuracy of the conversion suffers, as the lowest bits won’t be correct anymore. The higher the clock frequency, the worse the accuracy will become. If the frequency gets too high, the result may even be completely wrong. After the conversion is complete, a flag is set in the ADC’s status register.

Task2 also reads the value, modifies it, and writes back its result. After that, Task1 gets back the CPU and writes back its own results, thus overwriting the modifications of Task2! The same problem can occur with a task and an ISR. In such a case, you must make sure that the read-modify-write operation is atomic and cannot be interrupted. If the byte is an I/O register, that is, a register which controls and/or can be modified by hardware, the problem is even more urgent because now the hardware may modify bits anytime.

If it can, or if the application programmer prefers to be on the safe side, the controller at least offers the possibility to read back the current state of the pin via the PIN register. Of course, the PIN register suffers from the input delay, so a short-circuit will only become visible in the PIN register din clock cycles after the output pin has been set. Hence, the application must wait for this amount of time before it can check the PIN. If a mismatch is detected, the application program should set the pin to input immediately and notify the user.

Download PDF sample

Rated 4.88 of 5 – based on 6 votes