015 set bit position 7 to desired value or with 0x80

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: gister at $...005 set bit to output store value back to $...005 * , 5 7 #( 8 9 7 #( 8 6 8 Design a system to control a digital Solution: design a PWM unit " " " 7 #( 8 & ! # $ '& ! # $ ! # (% 7 ! " # $ %& ! " # $ %& '& " # (% ! . 0 Sonar range finder Compass IR proximity detector Accelerometer Bright LED // in initialization code Write off to onOff register // do some stuff // set up PWM Repeat for each motor Write highTime and period registers // turn motors on Repeat for each motor Write on to the onOFF register // more stuff # Uses ultra-sound (not audible) to measure distance Time echo return Sound travels at approximately 343m/sec need at least a 34.3kHz timer for cm resolution One simple echo not enough many possible reflections want to take multiple readings for high accuracy , , Commonly found on old Polaroid cameras, now a frequently used part in mobile robots Transducer (gold disc) charged up to high voltage and “snapped” disc stays sentisized so it can detect echo (acts as microphone) Controller board high-voltage circuitry to prepare disc for transmitting and then receiving 6 # , , 1 42 Only need to connect two pins to microcontroller Four compass directions (each has three pins) One-hot/two-hot encoding INIT - start transmitting ECHO - return signal one-hot for N, E, S, W two-hot for NE, SE, SW, NW Some important information from data sheet INIT requires large current (greater than microcontroller can provi...
View Full Document

Ask a homework question - tutors are online