Bitwise maths and logic operators

Fonte: Bitwise maths and logic operators Hello, here I’m again, today I will give a small maths lesson, don’t run away, its easy and its very useful for embedded programming, and its also nice to know a bit more about how our little micro-controller works. In fact I will write about bitwise operator and their…

Direct port manipulation, using the digital ports

Fonte: direct-port-manipulation-using-the-digital-ports Direct port manipulation, using the digital ports [tutorial part 3] Hello fellow readers, today I will write a bit about the digital pins and how to read and write digital values to then, its a simple subject but of a great importance, because almost everything that our micro-controller does is using its inputs and outputs…

Atmega328p – Port Registers

Fonte: PortManipulation Fonte img: atmega-328p-pu-precargado-con-bootloader-para-arduino Port Registers Port registers allow for lower-level and faster manipulation of the i/o pins of the microcontroller on an Arduino board. The chips used on the Arduino board (the ATmega8 and ATmega168) have three ports: B (digital pin 8 to 13) C (analog input pins) D (digital pins 0 to 7)

Timers on the ATmega168/328

Fonte: timers-on-the-atmega328 Timers on the ATmega168/328 INTRODUCTION:       The timers are the heart of automation. We have seen in previous chapters how we could take in an input, perform mathematical functions on the data and, perform an action. Timers give us an extra level of control by giving us not only control over what happens but…

A TOUR OF THE ARDUINO INTERNALS: HOW DOES HELLO WORLD ACTUALLY WORK?

Fonte: An tour of the arduino internal Everyone who’s ever played with an Arduino has seen the following sketch: void setup(){ pinMode(13, OUTPUT); } void loop(){ digitalWrite(13, HIGH); delay(500); digitalWrite(13, LOW); delay(500); } It’s the classic physical computing ‘hello world’: blink the onboard LED on and off every 500ms. But how does it really work? How…

Secrets of Arduino PWM

Fonte: Secrets of Arduino PWM – Secrets of Arduino PWM – Fast PWM on ATmega328, up to 8MHz Secrets of Arduino PWM Pulse-width modulation (PWM) can be implemented on the Arduino in several ways. This article explains simple PWM techniques, as well as how to use the PWM registers directly for more control over the duty cycle and frequency. This…

I2C LCD Controller

Ho comprato dei moduli I2C per display LCD basato sul chip PCF8574T. Una volta assemblato, l’aspetto del display + modulo è molto simile alla Fig. 2. Basta poi collegare i 4 pin laterali ad arduino e il gioco è fatto (almeno la parte elettronica 🙂 ). VCC   ->  5v SCL     ->  A5…

ATmega328

Fonte: http://www.leonardomiliani.com/2013/i-bit-fuse/ I microcontrollori Atmel possiedono al loro interno alcuni registri che servono a modificare alcune caratteristiche particolari del microcontrollore, ad esempio le opzioni riguardanti il clock, l’area di memoria da riservare al bootloader, l’attivazione di circuiti interni quali il WatchDog (WD) o il Brown-out Detector (BOD), l’abilitazione del pin del reset ed altro ancora.…

Arduino standalone: caricare bootloader

Nel precedente articolo abbiamo visto come collegare e rendere operativo un microcontrollore ATmega328. Per poter iniziare a programmare il nostro microcontrollore abbiamo bisogno di caricarci sopra il bootloader, operazione non fondamentale dato che lo si può configurare in vari modi ma fondamentale se si vuole usare l’ide arduino senza problemi (e simulare una scheda Arduino…