background preloader

PortManipulation - Aurora

PortManipulation - Aurora
Reference Language | Libraries | Comparison | Changes 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) Each port is controlled by three registers, which are also defined variables in the arduino language. DDR and PORT registers may be both written to, and read. PORTD maps to Arduino digital pins 0 to 7 DDRD - The Port D Data Direction Register - read/write PORTD - The Port D Data Register - read/write PIND - The Port D Input Pins Register - read only PORTB maps to Arduino digital pins 8 to 13 The two high bits (6 & 7) map to the crystal pins and are not usable DDRB - The Port B Data Direction Register - read/write PORTB - The Port B Data Register - read/write PINB - The Port B Input Pins Register - read only PORTC maps to Arduino analog pins 0 to 5. Examples See

StepperBipolarCircuit - Aurora Reference Language | Libraries | Comparison | Changes Two Pins Four Pins Reference Home Schematic for Arduino Sensor Shield v5.0 ? - Arduino Forum - Aurora It's very unfortunate that the term "Arduino" is used both for a specific company name and also for generic module compatibility from any manufacturer. Arduino is a trademark that many folk in various countries are only too happy to violate. Consider how easy it is to violate said trademark, BTW. Unlike Digilent and other companies products' you don't even need to reverse-engineer the schematics, code, etc. because it's all published for the world to use. My Mega2560 is marked "WWW.ARGUINO.CC" and "DESIGN IN ITALY". Well, reads like a knockoff whose intent was to skirt the trademarked name, much like "Rotex", "Prolex", and other variations of a well-known watch brand. My "Arduino Sensor Shield v5.0" has "SainSmart" stenciled on the reverse side, yet sells an apparently identical shield with an identically-colored PCB. Cheers and best of luck with your project. --- Edited to acknowledge that Digilent publishes its Eagle files ----

RotaryEncoders - Aurora ALPS STEC12E07 Encoder A rotary or "shaft" encoder is an angular measuring device. It is used to precisely measure rotation of motors or to create wheel controllers (knobs) that can turn infinitely (with no end stop like a potentiometer has). I've written a little sketch to read a rotary controller and send its readout via RS232. It simply updates a counter (encoder0Pos) every time the encoder turns by one step, and sends it via serial to the PC. This works fine with an ALPS STEC12E08 encoder which has 24 steps per turn. I learned about how to read the encoder from the file encoder.h included in the Arduino distribution as part of the AVRLib. Example 1 Oh, a few notes: I'm not sure about the etiquette of this, but I'm just going to add onto this tutorial. Below is an image showing the waveforms of the A & B channels of an encoder. This might make it a little more clear how the code above works. Interrupt Example Below is some code that uses an interrupt. BY:dskv ***CAUTION!!! void setup() {