Mónica Pedro

Embeded Programming

Back to main page

Preparation

AVR architecture basics: on Wikipedia

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:


Going through Atmega Attiny328P Data Sheet i found important to keep the followinh notes:

Arduino as ISP

Arduino as ISP and Arduino Bootloaders

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:

using the actual connections I tried the EXample code for button provided by Arduino Tutorial Button

and it worked very well

Final code

programming using C

Three simple button-LED c-programs illustrating the use of macros.

miss lots of simple steps... so continued to search...

C Programming with Caleb Curry

VIM editor main commands

... but I'd ERROR:

hello.c:1:10: fatal error: 'studio.h' file not found

#include studio.h

^~~~~~~~~~

1 error generated.

So I discovered that needed to install C .. and fallow this orientation

How to install gcc compiler on Mac OS X


the configuring GCC through the terminal

... tried again to compile using GCC and got the same ERROR....

hello.c:1:10: fatal error: 'studio.h' file not found

#include studio.h

^~~~~~~~~~

1 error generated.



...more research online and got to this wonderful page

Learn to code using the C programming language on your Mac

Where I learned that MAC's already have a C compiler insider, and most important of Alll . I learned what a MAKE file was for... my tutores had not...

C# on a Raspberry Pi3

I'll install Mono

How to Write C# programs on a Raspberry Pi Using Mono

Board - Rpi3

Raspberrypi 3 specifications

Most important:

Assigment's

Individual

  • read a microcontroller data sheet
  • program your board to do something,
  • with as many different programming languages
  • and programming environments as possible