Since I would like to use an Arduino, I searched around and found a good basic video on the architecture: ATmega328 Architecture Overview.
some transcripted notes from the video:
...is a low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC architecture
...By executing powerful instructions in a single clock cycle, the ATmega328P achieves throughputs approaching 1 MIPS per MHz allowing the system designer to optimize power consuption versus processing speed.
......but what's MIPS????
...MIPS stands for Million Instructions Per Second, which is a mora accurately way of describing speed
... Instead of focusing on the cycles per second or Hz/MHz, we focus on the instructions per second
......and since microcontrollers can execute a LOT of instructions per second, we use Millions of instructions per second!
... the CPU
... where all the instructions are executed
... direct connection with the Flash and SRAM memories, two different bus for data and instructions:
Flash: store messages
SRAM: stores temporary data
...Power Superision
... BOD - Brown-out Detection - detect when the voltage is dropping
...... and do something when this is happening
... Oscilator - System clock
... Whatchdog Timer Oscilator - monitor if the microcontroller is working properly
... EPROM stores data until we want if to, while in SRAM its ost when power off
...Data Bus - single line connecting everything
shared bus
in it we can find all the peripherals in the microcontroller
all of this are peripherals:
T/C - Timer /Counter - which can count time and events
USART - Universal Synchronous Asynchronous Receiver Transmitter - allows us to communicate through serial from external devices
Analog Comp. - to compare voltage great or lower than the specified voltage
SPI - Serial Programmer Interface
A/D Conv. - Analog to Digital Converter
Internal Bandgap - which is:
temperature independent voltage reference
it produces a constant/fixed voltage regardless of the power supply variations, temperature changes and circuit loading from a device
TWI - two-wire bus
PORT's - there's 3, which are the external PINs to the microcontroller, namelly:
PORT D (8) - which as 8 pins
PORT B (8) -which also as 8 pins
PORT C (7) - only having 7 pins
Going through Atmega Attiny328P Data Sheet i found important to keep the followinh notes:
The programming process uses a VCC, GND and four data pins. Three pins connect MISO, MOSI and SCK between the programming micro and the target micro, thr fourth pin from the programming micro goes to the reset pin of the target.
...but at the MILL I could only find a Arduino clone: Freaduino UNO V.1.8.1. which seems to work the same way
made the connection between BlinkyBoard ISP Head to Freaduino ICSP head, which result in ERROR
averdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
Fortunately Timoteo was at MILL to help me, and after some deep analysis of the Arduino Board Schematic, proposed to connect the RESET pin directy to Pin13 of Arduino
downloaded the program from Adruino IDE and there was no more error's... !!!
to Test the board used the Arduino IDE example Brasic - Blinky, where I changed the Pin on the code
substitued the LED_BUILTIN with the pin number of my board, in this case pin 7, here is the final code that worked:
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(7, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(7, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(7, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Now making my own program to create interaction with the Tactile Witch
important info from by BlinkyBoard are:
LED pin: 7
Button pin: 3
using the actual connections I tried the EXample code for button provided by Arduino Tutorial Button