Advance Your Skills Professionally! Advance Your Skills Professionally! 'ARM Microcontrollers: Programming and Circuit Building Volume 1', accompanied by a beginner-friendly advanced kit, is the ideal starting point for aspiring professionals. Esteemed in universities and high schools, this guide bypasses the complexities of Arduino, offering a more fundamental, bare-metal approach to learning. It not only simplifies the process but also sets you on a path to a more professional level in microcontroller programming. Perfect for students and hobbyists, this book is your gateway to efficiently prototyping and transitioning projects into production. Start with the fundamentals and quickly move to creating professional-level applications!
This is the first in an ongoing series on the ARM microcontroller, how to program the microcontroller and the circuit building asociated with this controller. This will be a series very similar to the Arduino or AVR series that you can find on newbiehack.com. I will be demonstrating many different types of circuits, control, communication and sensing using the ARM M0 through the Latest M series that is available at the time of the video creation.
For those of you that may not know what a microcontroller is, or what is does: a microcontroller can do what its name implies, control. But it can also sense, receive input, respond to events, and communicate with other devices and peripherals such as external computers, other microcontrollers, or other devices that have integrated circuitry that enables it to communicate.
The ways that microcontrollers can sense is that they can receive analog input from a sensor and have that input converted into a digital format enabling the microcontroller to sense things such as temperature, light, sound, pressure, anglular momentum, gravity, movement, etc.
Mircocontrollers can communicate to other devices and computers using serial communication such as I2C, UART, SPI, and all of these can enable wireless communication like wifi, bluetooth, radio frequency, etc.
The style of instrution I like to give is based on the lowest level fundamentals with circuit building, which means using the single processor and building off of that, not using a platform like th e arduino, discovery board, or Raspberry P (RPi). Learning in this more fundamental way will engender better foundational knowledge on how to design efficiently and prototype for large production. If you start with a platform that alreaqy has a large buildup of circuitry, once you embark on making a real design for production, you need to take steps backward to get to an efficient prototype. Keep arduinos and other interface platforms to one off projects, and learn the fundamentals if you want to get into design that is efficient and cost effective.
The programming language used will be c++ and in most cases, I will create the libraries rather than using existing libraries. This will alow you to understand the code fundamentals on how the peripherals and external devices really work and you will be able to code more efficiently. There will be cases that I use libraries where the creation of a library would be far too complex and that the library in question has already gone through quite a bit of scrutiny. One library that comes to mind is accessing a file system on an SD card where the library has functions to read, write and manipulate a FAT File allocation system.
Since the microcontroller is a surface mount device, we can't just plug this into a breadboard. We need a way to get the pins into a breadboard and we will be using this card and interface. The card simply contains the ARM microcontroller and a way to get the legs of the microcontroller into the tie strips of the breadboard. The card was design to specifically use three breadboards, one for each of three sides of the card. The configuration works well since there are many tie strip connections for each pin and there is a break between the breadboard to add a resistor or other component to another tie strip. For instance, a resistor can be placede here and the LED placed here which is more visually coherent than placing the components in a zigzag on neighboring tie strips.
We will delve into the reference manual for this microcontroller from time to time. The STM32F030 reference manual is complete with all the information you will need to access all of the features of the STM32F030 microcontroller.
I built small LED badge powered by coin cell and Attiny85 SOIC chip.
It's charlieplexing setup with 4 pins driving 12 LEDs. However after I soldered everything I wasn't able to program processor, was getting invalid signature error. So I soldered another board, adding one component at time. Long story short, I found issue is cased by Resistor/LED that's between MOSI and MISO lines (pins 5 and 6). I'm using USBTiny ISP to program chip from Arduino IDE environment. Everything works when I remove that resistor (R7), but that only gives me 6 LEDs instead of 12. Is there anything that can be done, and why is this happening? I'm attaching schematics if that helps...
I've had similar problems a few times. Basically there is more load present than the programmer can drive. One workaround would be to program the MCU before installing the LEDs and their associated current-limiting resistors.
Thanks! Oh well I might try that once I iron out the code All components I'm using SMD, so it's a pain to solder/desolder resistor each time I need to reprogram chip
BTW, I was wrong about 6 LEDs, looks like I can still control 10!
Debug with through-hole parts on a breadboard? Another alternative, use larger resistors, say between 470? and 1K, build one board with those and use that to debug. I have some SMT LEDs that are plenty bright with 1K.
bratan:
It's charlieplexing setup with 4 pins driving 12 LEDs. However after I soldered everything I wasn't able to program processor, was getting invalid signature error. So I soldered another board, adding one component at time. Long story short, I found issue is cased by Resistor/LED that's between MOSI and MISO lines (pins 5 and 6).
Most people do not try to program an ATtiny85 in the target PCB. It is generally plugged into somithing like a TinyISP and then moved to the target board after programming. Why don't you just breadboard the Arduino as ISP UNO - ATtiny85 programming circuit on a small breadboard and upload your sketches in that and then transfer the tiny to the target board. Wouldn't that be much easier that trying to troubleshoot an unusual problem ?
You could make a high-power ISP adapter. Programmer connects on one end, target connects on the other end. Transistors you add in between will drive heavier loads (at least for SCK and MOSI, not sure how much you can help MISO).
raschemmel:
Most people do not try to program an ATtiny85 in the target PCB. It is generally plugged into somithing like a TinyISP and then moved to the target board after programming. Why don't you just breadboard the Arduino as ISP UNO - ATtiny85 programming circuit on a small breadboard and upload your sketches in that and then transfer the tiny to the target board. Wouldn't that be much easier that trying to troubleshoot an unusual problem ?
When I build Tiny85 devices I try to assign the pins taking this problem into account. Anything that doesn't produce any load (eg. a push button which is normally open) goes straight onto the SCK/MOSI lines. After that it goes in order of impedance/loading.
Oooh , new replies! I wonder why I stopped receiving notifications, I'm still subscribed
Thanks guys, I really like idea of high power ISP programmer, I'm gonna try building one.
Yeah adding any kind of extra switch or programming chip off board is challenging since size of this device is tiny. Here's a video of my digital butterfly in action
Why? I like USBTiny ISP Does UNO provide higher voltage?
BTW, for some reason USBTiny won't program ATTiny85 SOIC version unless I have power jumper on. It does program ATTiny85 thru the hole version tho without extra power...
So going back to your original problem, does that mean the USBTiny failed because you didn't have the power jumper on?
Were you trying to program the attiny85 with it powered via coin cell? Or do you remove the coin cell before programming?
Also depending on which version USBTiny you have and how it was built, the series resistor was optional. Like the Adafruit USBTinyISP version it was recommended not to include the series resistor for most applications.
From cell phones and television remote controls to automobile engines and spacecraft, microcontrollers are everywhere. Programming these prolific devices is a much more involved and integrated task than it is for general-purpose microprocessors; microcontroller programmers must be fluent in application development, systems programming, and I/O operation as well as memory management and system timing.
Using the popular and pervasive mid-range 8-bit Microchip PIC as an archetype, Microcontroller Programming offers a self-contained presentation of the multidisciplinary tools needed to design and implement modern embedded systems and microcontrollers. The authors begin with basic electronics, number systems, and data concepts followed by digital logic, arithmetic, conversions, circuits, and circuit components to build a firm background in the computer science and electronics fundamentals involved in programming microcontrollers.
For the remainder of the book, they focus on PIC architecture and programming tools and work systematically through programming various functions, modules, and devices. Helpful appendices supply the full mid-range PIC instruction set as well as additional programming solutions, a guide to resistor color codes, and a concise method for building custom circuit boards.
Providing just the right mix of theory and practical guidance, Microcontroller Programming: The Microchip PIC is the ideal tool for any amateur or professional designing and implementing stand-alone systems for a wide variety of applications.