Embedded Programming




Assignment




In this week we are assigned to read a microcontroller data sheet, program our board to do something and use different programming languages and programming environments as possible




The microcontroller is an integrated circuit built to control the operation of the embedded system. The microcontroller can be programmed to do whatever reequired depends on the required operations to do. it has variables inputs and outputs for the action needed.



  • VCC = Supply Voltage
  • GND = Ground
  • RESET = Reset input.
  • Port B (PB3 to PB0) Port B is a 4 bit bi directional I/O port with internal pull up resistors
  • Port A (PA7 to PA0) Port A is a 8bit bi directional I/O port with internal pull up resistors






  • Programming




    To program The board that has been made in week 7 we need usbtiny isp or any other available programmer so I used arduino uno as a a programmer. In this case we to setup the arduino uno board to be a programmer by following the steps:

    Arduino ISP selection







    select the board and the port for uploading










    Now we can upload the code for arduino uno board







    in this step we need to connect the specified Pins of arduino uno board to the pins of the board which has been made in week 7







  • SCK = 13
  • MISO = 12
  • MOSI = 11
  • RST = 10
  • GND to GND
  • VCC = VCC



  • After confirmation of the wires connectin we need to connect the usb cable of arduino uno board to PC and setup the following settings for the code uploading . The code I made to switch ON/OFF the led repeatedly in certain time













    The Code




    Now we are going to upload the code which will make the micro controller to switch the LED ON/OFF repeatedly in certain time. Since the LED is connected to pin 8 of the ATtiny 44, and the LED is an output component, in void setup section we need to insert (pinMode (8,OUTPUT);). In void loop we need to inser the following:

  • digitalWrite (8,HIGH); = to switch on the LED
  • delay (500); = Delay 500 ms
  • digitalWrite (8,LOW); = to switch off the LED
  • delay (500); = Delay 500 ms









  • Files




    Microcontroller Board

    The Code


    http://highlowtech.org/?p=1695