Demonstrate the function of a logic chip on a bread board.
Use the SN74AC08N (Quad AND gate) along with the DIP switch and pull-up or pull down resistors to show the function of an AND gate. Show the output by hooking it to an LED with a 330 ohm resistor in series.
Use 5V from the power supplies.
Get a simple program onto the microcontroller (counting program, anything that turns some LEDs on).
Use the diagram from the comparitor slide to experiment with the IR sensor and the LM393 comparitor in your kit. Try to get the IR signal to have the comparitor turn an LED on/off.
Remember, the IR led in the sensor needs a resistor (like any LED) and the output of the comparitor is an "open collector"
Get the AtoD assembly program working and displaying the conversion from ADC0 (pin 23) on PORTD with LEDs.
.def TMP = r16
.org 0
init:
ser TMP
out DDRD, TMP ; DDRD is in lower I/O space — OK
ldi TMP, 0b01100000 ; AVcc, left justified, ADC0
sts ADMUX, TMP ; use sts for ADMUX (0x7C)
ldi TMP, 0b10000111
sts ADCSRA, TMP ; use sts for ADCSRA (0x7A)
rjmp main
main:
lds TMP, ADCSRA
ori TMP, (1 << ADSC)
sts ADCSRA, TMP
wait:
lds TMP, ADCSRA
sbrc TMP, ADSC
rjmp wait
lds TMP, ADCH ; use lds for ADCH (0x79)
out PORTD, TMP ; PORTD is in I/O space — OK
rjmp main