Posts Tagged ‘Hello World Boards’

Part III – Working & Completed Modified Hello Echo + Button + FTDI

Posted in 06 Embedded Programming, Fab Academy on August 5th, 2010 by Anna France – Be the first to comment


Fab Academy Embedded Programming Assignment:

1. add (at least) a button to the serial echo hello-world board
2. modify the serial echo assembly program to respond to the button

I modified the hello serial echo board (my modified echo board version2 – see previous posts) to respond to a button and added an FTDI header so I could use it as a substitute for the internet 0 serial board. (I have a Mac and therefore no serial port).

The behavior is that the LED is always on – but when the button is pressed, it turns off.

Modified Hello Echo FTDI + Button

Shawn and I modified Elliot’s reprogramming the echo board code.

Here is the code:

; Modified.Hello.Echo.Blink LED.44.asm
;
; blink LED when button is pressed
;
; Code Created At FAB ACADEMY AS220
; by Shawn Wallace & Elliot Clapp
; Last Modified 08/05/2010  - Anna Kaziunas France
;
; Permission granted for experimental and personal use;

.device attiny44
.org 0
cbi DDRA, 1
sbi DDRB, 2
loop:
	sbic PINA,1
   	sbi PORTB, 2
 	sbis PINA,1
  	cbi PORTB, 2
rjmp loop

Here is How to Get the Board Running:

I use an usbtiny programmer.

Copy the above code into a text file and save it with YourFileName and .asm extension.
Compile it using gavrasm:

gavrasm YourFileName.asm

Compiling the file will create a .hex file.

First – set the fuses on your board:

avrdude -p t44 -c usbtiny -U lfuse:w:0x7E:m

Second – flash the attiny44 with the program code you just compiled:

avrdude -p t44 -c usbtiny -U flash:w:YourFileName.hex

Part II: Modified Hello Echo + Button + FTDI

Posted in 06 Embedded Programming, Fab Academy on July 28th, 2010 by Anna France – Be the first to comment

Modified Echo Version 2 – In Production

I am having some issues with the Modela this week. I milled this board last night, but it came out hairy / torn up. I will give it another go tonight.

Modified Hello Echo + FTDI + Button v.2 - Board

Download Eagle file for the Board: hello_echo_button_07.26.2010.brd

Modified Hello Echo + FTDI + Button v.2 Schematic

Download the Eagle File for the Schematic: hello_echo_button_07.26.2010.sch

Part I: Modified Hello Echo + Button + FTDI

Posted in 06 Embedded Programming, Fab Academy on July 28th, 2010 by Anna France – Be the first to comment

Modified Echo Version 1 – Complete But Broken

This version milled out a bit hairy. Some of the traces were broken, so I used jumpers to re-connect them.

Modified Hello Echo + FTDI + Button  v.1

There must have been a short somewhere – after stuffing it, setting the fuses and flashing it, I plugged it in to a 9v battery and received a puff of smoke for my efforts. The LED went on – then smoke came out.

Modified Hello Echo + FTDI + Button v.1

In addition, I placed the button too close to the programming header, making it hard to press the button. I am not including the Eagle board or schematic here – see version 2 for a better board.

Back to Eagle!!! See version 2 for a (hopefully) improved and working board).

Hello Serial Echo

Posted in 06 Embedded Programming, Fab Academy on June 19th, 2010 by Anna France – Be the first to comment

hello serial echo

hello serial echohello serial echo

Fab Academy Module – 06 Embedded Programming

The Assignment

  • read an AVR data sheet (ATTtiny 44) – COMPLETE
  • make serial and programming cables – COMPLETE
  • add (at least) a button to the serial echo hello-world board – See Part II
  • modify the serial echo assembly program to respond to the button -See Part II
  • modify the serial echo C program to respond to the button -See Part II

The Project: Hello Serial Echo

This hello world board uses a python program (term.py) to send keyboard input over a serial connection from the board to the computer. It is called “serial echo” because when the computer is able to communicate with the board via serial, the python program will allow the keyboard input to be sent to the board and then “echo” it back to the computer. The keyboard input / text will then appear in the python window.

Type the following into the terminal at the prompt:

python term.py /dev/ttyS0 115200

Where “/dev/ttyS0″ is the name of the serial port connection to your computer.

When It Is Working – You Should See..

hello echo output

Skills Learned

  • I learned how to send data back and forth via a serial connection using Neil’s python program term.py.
  • Cable making

Tools Used

  • Modela milling machine
  • python – term.py
  • a computer with a serial connection

Hello Step Response FTDI

Posted in 10 Sensors, Actuators and Displays, Fab Academy on June 18th, 2010 by Anna France – Be the first to comment

hello step response

Step response board + FTDI + Capacitive sensing

My first step in building this project was to start with the basics. I milled, stuffed and programmed the hello step response board (modified to use the FTDI header by Shawn Wallace). I have a Mac and I can’t troubleshoot / develop at home with the serial header examples.

hello step response

What You Will See When The Example is Working:

I am using terminal in OS X 10.4.11  – this was the terminal command I used to run the hello step response example and what it will say when it can communicate with the board and begin plotting the graph.

Anna-Kaziunas-Computer:~/Desktop/fab_runs/step annakaziunas$
python hello.step.45.py /dev/tty.usbserial-A600dVDy
finding framing ...
start plotting
0

This is the graph that is displayed:

Here is a screenshot of the charging graph that is produced by Neil’s hello.step.45.py code.  This initial charging graph shows the capacitor charging up.

hello 44

Here is the Capacitive Sensor I Made:

capacitive sensor

I used thin copper sheets to create the capacitor to test the hello step response board. I hooked them up to jumper wires.
When they copper sheets are touching or close to it, the graph will spike up. This indicates that current is flowing through the circuit.
When they are far apart the graph will flatten out. This indicates that the circuit is not connected.

For a video of this type of capacitive sensor in action – see the Puppet Master posts.