![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
motorola.com/semiconductors m68hc08 microcontrollers DRM014/d rev. 0.0, 3/2003 usb and ps/2 designer reference multimedia keyboard manual interface reference design f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . DRM014 rev 0 designer reference manual motorola 3 usb and ps/2 multimedia keyboard interface reference design designer reference manual rev 0 by: derek lau motorola ltd hong kong f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . designer reference manual DRM014 rev 0 4 motorola f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . DRM014 rev 0 designer reference manual motorola table of contents 5 designer reference manual DRM014 table of contents table of contents section 1. usb and ps/2 multimedia keyboard interface 1.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.2 overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.3 44-pin qfp mc68hc908jb8 features . . . . . . . . . . . . . . . . . . .8 1.4 hardware descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8 1.5 firmware description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.6 firmware files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 1.7 test description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 1.8 customization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 1.9 extra features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 1.10 further information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 1.11 schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 section 2. glossary f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . table of contents designer reference manual DRM014 rev 0 6 table of contents motorola f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . DRM014 rev 0 designer reference manual motorola usb and ps/2 multimedia keyboard interface 7 designer reference manual DRM014 section 1. usb and ps/2 multimedia keyboard interface 1.1 introduction this manual describes a reference design of a universal serial bus and ps/2 multimedia keyboard interface for microsoft windows by using the mc68hc908jb8. for the full mc68hc908jb8 specification, please refer to the data sheet, motorola order number: mc68hc908jb8/d. 1.2 overview the motorola mc68hc908jb8 is a member of the hc08 family of microcontrollers (mcus). the features of the mc68hc908jb8 include a configured universal serial bus (usb) or ps/2 interface, which makes this mcu suited for personal computer human interface devices (hid), such as mice and keyboards. the mc68hc908jb8 is available in several packages to fit into various applications. a multimedia keyboard with usb and ps/2 interface is demonstrated using the mc68hc908jb8 with a 44-pin qfp package. the main features of the keyboard include: ? fully usb specification 1.1 compliant ? usb or ps/2 interface auto detect ? windows 98, me and 2000 compatible ? power management keys (power, wake and sleep) support ? multimedia key support ? in-circuit programming for firmware modification f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface designer reference manual DRM014 rev 0 8 usb and ps/2 multimedia keyboard interface motorola 1.3 44-pin qfp mc68hc908jb8 features the 44-pin qfp mc68hc908jb8 is targeted for usb and ps/2 interface keyboard applications with minimum external components needed. features include: ? usb d+ and dC pins shared with ps/2 data and clock pins ? 27 out of 37 i/o pins with internal pull-up supports up to 8x19 key matrix ? 10ma direct drive pins for the num lock, caps lock and scroll lock leds ? internal 1.5k pull-up for usb dC data line ? internal 5k pull-ups for ps/2 data and clock pins 1.4 hardware descriptions figure 1-1. block diagram figure 1-2. usb and ps/2 connections mc68hc908jb8 8 x 18 key matrix scroll led caps led num led usb plug usb plug usb to ps/2 converter 12 4 6 5 3 ps/2 plug 6-pin ps/2 plug 1 C data (usb dC pin) 2 C nc 3 C ground (usb ground) 4 C + 5v (usb +5v) 5 C clock (usb d+ pin) 6 C nc f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface hardware descriptions DRM014 rev 0 designer reference manual motorola usb and ps/2 multimedia keyboard interface 9 figure 1-1 shows the block diagram of the keyboard. the solution includes the jb8, key button inputs and led indicator outputs only. the connections of the corresponding usb and ps/2 signals are shown in figure 1-2 . the usb to ps/2 converter standard connections are the usb dC and d+ pins connected to the ps/2 data and clock pins respectively. figure 1-3 shows the printed circuit board and figure 1-16 shows the schematic of the keyboard. ? j1 is used for usb connection ? j2 is used for ps/2 mouse connection (for future development) ? j3 and j7 are used for in-circuit programming ? 8 rows x 18 columns key matrix is implemented C 8 rows implemented in pta[7:0] C 18 columns implemented in ptb[7:0], ptc[7:0], pte0 and pte2 ? keyboard leds C scroll lock at ptd2 C caps lock at ptd3 C num lock at ptd4 figure 1-4 shows the key matrix for the 107 standard keyboard with power management keys (power, wake and sleep). figure 1-5 shows the key matrix for multimedia keyboard with function key. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface designer reference manual DRM014 rev 0 10 usb and ps/2 multimedia keyboard interface motorola figure 1-3. keyboard pcb 1.4.1 key matrix figure 1-4. 107-key matrix esc q z 5 f1 w x t + = f2 e c bck spc r v b [ { ~ ` a 6 ] } tab 2 s y spc 3 d h < , n f9 ptb0ptb1 ptb2 ptb3 ptb4 ptb5 ptb6 ptb7 ptc0 ptc1 ptc2 ptc3 ptc4 ptc5 ptc6 ptc7 pte0 f f3 f4 f5 f6 f7 f8 f10 f11 f12 ins del num lck | \ prnt scr scrl lck pause app 8 9 0 u i o p 7 k l : ; ent m > . lctrl j 4 9 * 4 5 6 7 2 3 + ent . / 1 home page up page down end r ctrl pwr dwn sleep wake r alt l sft r sft l gui pte2 caps lck r gui l alt _ - 8 1 ? / g 0 pta0 pta1 pta2 pta3 pta4 pta5 pta6 pta7 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface hardware descriptions DRM014 rev 0 designer reference manual motorola usb and ps/2 multimedia keyboard interface 11 figure 1-5. multimedia key matrix esc q z 5 f1 w x t + = f2 e c q bck spc r v b [ { ~ ` 1 a 6 ] } tab 2 s y spc 3 d h $32 < , n f9 pta0 pta1 pta2 pta3 pta4 pta5 pta6 pta7 ptb0 ptb1 ptb2 ptb3 ptb4 ptb5 ptb6 ptb7 ptc0ptc1 ptc2 ptc3 ptc4 ptc5 ptc6 ptc7 pte0 f f3 4 f4 f5 f6 f7 f8 f10 f11 f12 jpn3 ins del num lck | \ prnt scr scrl lck pause $64 jpn1 $85 app 8 9 0 u i o p 7 k l ; : ent m > . lctrl j 8 9 * 4 5 6 7 2 3 + ent 0 . / 1 home page up page down end l ctrl r ctrl pwr dwn sleep wake mk0 mk6 mk1 mk4 r alt jpn5 mk7 mk5 mk8 l sft r sft mk23 lang 1 jpn4 mk2 l gui mk9 mk18 mk10 mk11 lang 2 jpn2 pte2 mk3 sleep mk8 caps lck r gui fn l alt _ - f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface designer reference manual DRM014 rev 0 12 usb and ps/2 multimedia keyboard interface motorola 1.4.2 in-circuit programming j3 and j7 contain all the signals for the mc68hc908jb8 to enter monitor mode for in-circuit programming. the icp requires j3 and j7 to be connected with a cable to the icp adaptor board, which is plugged-into the m68hc08 serial programmer (m68spgrm08) (see figure 1-6 ). running the mcuscribe software on the pc allows erase, programming and verification of the firmware in the mc68hc908jb8. the communication baud rate is determined by the jumper setting of j3 of the icp adaptor board. connect pins 1 and 2 of j3 for 9600bps and pins 2 and 3 for 19200bps. figure 1-6. in-circuit programming connection 1.5 firmware description the firmware consists of three main parts: ? usb and ps/2 interface detection ? ps/2 main program and subroutines ? usb main program and subroutines f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface firmware description DRM014 rev 0 designer reference manual motorola usb and ps/2 multimedia keyboard interface 13 figure 1-7. usb and ps/2 detection delay 350ms (power on delay) initialization enable usb dC pullup d+ high for 1ms ? over 10 seconds ? usb reset? d+ high for 1ms ? no no no yes setup detected ? no over 10 seconds ? no no ps/2 usb ps/2 usb usb yes yes yes yes yes f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface designer reference manual DRM014 rev 0 14 usb and ps/2 multimedia keyboard interface motorola 1.5.1 usb and ps/2 detection pte3 and pte4 can be configured as usb d+ and dC pins or as open-drain i/o pins for ps/2 data and clock lines. figure 1-7 shows the algorithm for distinguishing between a usb and a ps/2 interface. after power on, the interface protocol is undetermined and can be either a usb or a ps/2 interface. the firmware first initializes the registers and the i/o ports. it then performs a 350ms software delay to meet the ps/2 power on delay requirement. the usb engine and the internal usb pullup resistor are enabled. pte3 and pte4 are configured as usb d+ and dC pins with a 1.5k internal pullup at dC pin. for a low speed usb interface, d+ pin will not be continuously high for more than 4 s because of the bit stuffing mechanism. the ps/2 interface is determined by 1ms continuously high at d+ pin while the usb interface is determined by receiving a setup token. after the interface mode is detected. the firmware enters either the ps/2 main routine or the usb main routine. 1.5.2 ps/2 main routine i n ps/2 mode, pte3 and pte4 are configured as open-drain i/o pins with 5k internal pullup resistors enabled. figure 1-8 shows the ps/2 main routine. the main functions of the ps/2 routines are: ? receive commands from host ? respond to received commands ? scan key matrix ? send make code to host if key pressed ? send break code to host if key released f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface firmware description DRM014 rev 0 designer reference manual motorola usb and ps/2 multimedia keyboard interface 15 figure 1-8. ps/2 main routine send self test fail code ($fc) send self test pass code ($aa) ps/2 initialization self 40ms timer tick ? yes keys pressed test pass ? scan key matrix yes send make codes no yes stop or released for keys pressed send break codes for keys released ack and valid command from host ? handle command no yes ghost key ? no no yes send self test pass code ($aa) send self test fail code ($fc) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface designer reference manual DRM014 rev 0 16 usb and ps/2 multimedia keyboard interface motorola 1.5.3 ps/2 protocol the ps/2 is a bidirectional serial interface using two signals: clock and data. the data consists of 11 bits including 1 start bit, 8 data bits, 1 odd parity bit, and 1 stop bit. ps/2 device generates the clock signal with a typical cycle of 80 s in both host-to-device or device-to-host communications. table 1-1 shows the setting of the registers for controlling the pte3 (clock) and the pte4 (data) pins. instead of setting ddr3/ddr4 as high to output a high signal, we set ddr3/ddr4 as an input with internal pullup to perform the same function. in the ps/2 routines, the values of pte3 and pte4 are cleared to zero and the values of pte3p and pte4p are set to one. set ddr3 or ddr4 to one to force it as output low, or clear ddr3 or ddr4 to zero to make it high impedance and pulled high by the 5k internal resistor. 1.5.4 host to device communications data sent from host to device is read while the clock line is high. in an idle state, both the clock and the data lines are pulled high. the host starts sending data by pulling the clock line low for a minimum of 100ms. figure 1-9 shows the signal diagram. communications steps are shown as below: 1. host waits until no auxiliary device transmission is in progress. table 1-1. clock and data line control register bits port pins register pocr pte ddre iocr pocr pte ddre pte4 (data) pte3 (clock) bit pte4p pte4 ddre4 pte4ie pte3p pte3 ddre3 pte4 (data) pte3 (clock) pte4 interrupt enabled 1 input high release data/clock high 1010 input high input high drive data/clock low 0 10 1 output low output low f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface firmware description DRM014 rev 0 designer reference manual motorola usb and ps/2 multimedia keyboard interface 17 2. host pulls the clock line low. 3. host pulls the data line low as the start bit. 4. host releases the clock line. 5. device pulls clock line low. 6. host sends out data. 7. device releases the clock line high and read data. 8. device reads the clock line and aborts communication if the clock line is low. 9. repeat steps 5 to 7 for data 1 to data 7 and the parity bit. 10. device pulls the clock line low. 11. host releases the data line. 12. device releases the clock line high. 13. device reads the data line high for stop signal and sends error if the data line is low. 14. device pull the data and the clock lines low. 15. device release the clock and the data lines. figure 1-9. host to device communication kbd_in is the irq1 interrupt routine for receiving data from host. the interrupt is configured to execute when a falling edge at the pte4 (data) pin is detected. clock data start data0 data1 data2 data3 data4 data5 data6 data7 parity stop ack 2 3 6 11,13 12 step 1 4 7,8 9 10 14 15 5 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface designer reference manual DRM014 rev 0 18 usb and ps/2 multimedia keyboard interface motorola 1.5.5 device to host communications data sent from device to host is read at the falling edge of the clock. the device checks whether the host is ready by detecting the clock high before transmitting data. figure 1-10 shows the signal diagram. communications steps are shown as below: 1. device waits for the clock line high for a minimum of 50ms. 2. abort if the data line is low. 3. device sends out data. 4. device pulls the clock line low. 5. device releases the clock line high. 6. device reads the clock line and aborts communication if the clock line is low. 7. repeat steps 4 to 6 for data 0 to data 7, the parity bit and the stop bit. 8. device releases the clock line high. figure 1-10. device to host communication kbd_out is the routine for transmitting data to the host. the data to be transmitted is put into v_txbyte before calling this routine. 1.5.6 ps/2 keyboard command both the host and the keyboard may send commands to each other. the keyboard transmits an acknowledge ($fa) after receiving a valid clock data start data0 data1 data2 data3 data4 data5 data6 data7 parity stop 3 step 1,2 4 5,6 8 7 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface firmware description DRM014 rev 0 designer reference manual motorola usb and ps/2 multimedia keyboard interface 19 command. when the keyboard receives an invalid command, it returns a resent command ($fa). 1.5.7 host to keyboard commands 1.5.8 keyboard to host commands table 1-2. host to keyboard commands code description implemented $ed set status indicators yes $ee echo yes $f0 set alternate scan code no $f2 get keyboard id yes $f3 set typematic repeat rate yes $f4 enable scan yes $f5 disable scan yes $f6 set default values yes $f7 set all keys typematic no $f8 set all keys make/break no $f9 set all keys make no $fa set key type typematic/make/break no $fb set key type typematic no $fc set key type make/break no $fd set key type make no $fe resent the last commandyes $ff reset yes table 1-3. keyboard to host commands code description implemented $00 keyboard detection or overrun error yes $aa basic assurance test passedyes $ee echo yes $fa acknowledge yes $fe resendyes f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface designer reference manual DRM014 rev 0 20 usb and ps/2 multimedia keyboard interface motorola 1.5.9 ps/2 scan codes there are three sets of scan codes (code 1, 2, and 3). most pcs support scan code set 2, hence this is the only scan code the firmware supports. make code or break code is sent when any key is pressed or released. while a key is pressed, its make code is sent out repeatedly and the rate depends on the typematic repeat value. in addition to the ibm standard, microsoft has published standards for the windows keys, power management keys (sleep, wake, and power), and the audio control keys. table 1-4. scan codes supported by windows 98, me, and 2000 description make code break code left windows $e0, $1f $e0, $f0, $1f right windows $e0, $27 $e0, $f0, $27 applications $e0, $2f $e0, $f0, $2f power $e0, $37 $e0, $f0, $37 sleep $e0, $3f $e0, $f0, $3f wake $e0, $5e $e0, $f0, $5e table 1-5. scan codes supported by windows me and 2000 description make code break code scan next track $e0, $4d $e0, $f0, $4d scan previous track $e0, $15 $e0, $f0, $15 stop $e0, $3b $e0, $f0, $3b play/pause $e0, $34 $e0, $f0, $34 mute $e0, $23 $e0, $f0, $23 volume increase $e0, $32 $e0, $f0, $32 volume decrease $e0, $21 $e0, $f0, $21 al email reader $e0, $48 $e0, $f0, $48 ac search $e0, $10 $e0, $f0, $10 ac home $e0, $3a $e0, $f0, $3a ac forward$e0, $30 $e0, $f0, $30 ac stop $e0, $28 $e0, $f0, $28 ac reflesh $e0, $20 $e0, $f0, $20 ac bookmarks $e0, $18 $e0, $f0, $18 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface firmware description DRM014 rev 0 designer reference manual motorola usb and ps/2 multimedia keyboard interface 21 table 1-6. scan codes supported by windows me description make code break code ac calculator $e0, $2b $e0, $f0, $2b ac local browser $e0, $40 $e0, $f0, $40 ac consumer control configuration $e0, $50 $e0, $f0, $50 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface designer reference manual DRM014 rev 0 22 usb and ps/2 multimedia keyboard interface motorola figure 1-11. usb main routine usb initialization device 40ms timer tick ? new endpoint 1 yes new endpoint 2 usb idle for yes configured ? scan key matrix yes convert scan key to keyboard report report ? report ? 6 ms ? no ep1 tx buffer yes empty ? tx ep1 in report yes ep2 tx buffer yes empty ? tx ep2 in report suspend device yes key pressed or resume from host ? no no no yes ghost key? no yes f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface firmware description DRM014 rev 0 designer reference manual motorola usb and ps/2 multimedia keyboard interface 23 1.5.10 usb main routine figure 1-11 shows the usb main routine. the routine scans the keyboard every 40ms. if there are keys pressed or released, it puts the key codes into a buffer and prepares the input reports for the keys through endpoint 1 or endpoint 2. if the usb bus idles for more than 6ms, the routine puts the mc68hc908jb8 into stop mode until it detects a resume signal from the host or any key pressed for remote wake-up. figure 1-12 shows the usb interrupt routines. the usb engine automatically responds to a valid usb token with either ack, nak, or stall, depending on the registers setting, and ignores it if it is invalid. the firmware has to set the registers for the usb engine to give a correct response to the token in different stages. the usb interrupt will be executed whenever there is an eop, resume signal from host, valid data received or data transmitted. the usb interrupt routine also makes preparation for the next usb transaction and handles any valid command or data received. figure 1-13 to figure 1-15 show the routines of handling the control transfers. control transfers have two or three transaction stages: setup, data (optional) and status as shown below: ? control write: setup, out, out, out... in ? control read: setup, in, in, in... out ? no data control: setup, in the firmware first distinguishes the kinds of control transfers and does the corresponding preparation for the next stage. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface designer reference manual DRM014 rev 0 24 usb and ps/2 multimedia keyboard interface motorola figure 1-12. usb interrupt routine usb interrupt routine yes eop ? reset suspend counter no no setup ? yes no out token yes to ep0 ? no ep0 tx completed ? yes no ep1 tx completed ? yes disable ep1 transmit & clear ep1 tx flag no ep2 tx completed ? yes disable ep2 transmit & clear ep2 tx flag no resume form yes clear resume flag host? return from interrupt setup handler out ep0 handler in ep0 handler f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface firmware description DRM014 rev 0 designer reference manual motorola usb and ps/2 multimedia keyboard interface 25 figure 1-13. setup routine figure 1-14. out ep0 handler setup handler no yes 1.unstall ep 0 in & out 2.copy 8 byte setup data to ram buffer 3.clear ep0 rx flag 4.set nak to in ep0 standard device request ? handle standard device request no yes hid class request ? handle hid classe request return stall return out ep0 handler no yes status stage ? 1. set nak to ep0 in 2. set stall to ep0 out (control transfer completed) no yes valid data return stall return 1. copy data to buffer 2. process out data f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface designer reference manual DRM014 rev 0 26 usb and ps/2 multimedia keyboard interface motorola figure 1-15. in epo handler usb key codes the key codes or usage ids for a basic 104 keyboard are defined in the usb hid usage tables. in addition to the basic key codes, microsoft has published standards for the windows keys, power management keys (sleep, wake, and power), and the audio control keys. acpi power management control set nak to in ep0 set stall to ep0 out (control transfer completed) all data sent? prepare for next data stage in epo handler no [data stage] yes status stage ? no yes return prepare for out stage table 1-7. consumer page hid controls in windows me and 2000 usage usage name data type $81 power relative $82 sleep relative $83 wake relative f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface firmware description DRM014 rev 0 designer reference manual motorola usb and ps/2 multimedia keyboard interface 27 consumer page audio control usb keyboard report the keyboard implements two hid interfaces on endpoint 1 and 2 in a usb composite-device fashion. hid interface 0 (endpoint 1) implements a standard hid keyboard with identical report and boot protocols. hid interface 1 (endpoint 2) implements multimedia and power management keys. this implementation ensures the keyboard works in bios setup and in dos mode. interface 0 will issue 8-byte input reports that are identical to the standard keyboard boot protocol report (see table 1-9 ) as documented table 1-8. consumer page hid controls in windows me and 2000 usage usage name usage type data type $b5 scan next track one shot control relative $b6 scan previous track one shot control relative $b7 stop one shot control relative $cd play/pause one shot control relative $e0 volume linear control relative $e2 mute on/off control relative $e3 bass linear control relative $e treble linear control relative $e5 bass boost on/off control relative $e9 volume increment re-trigger control absolute $ea volume decrement re-trigger control absolute $152 bass increment re-trigger control absolute $153 bass decrement re-trigger control absolute $154 treble increment re-trigger control absolute $155 treble decrement re-trigger control absolute $18a al email reader selector relative $221 bass increment selector relative $223 bass increment selector relative $224 bass increment selector relative $225 bass increment selector relative $226 bass increment selector relative $227 bass increment selector relative $183 al consumer control (1) configuration 1. currently supported in windows me only. selector relative $192 al calculator (1) selector relative $194 al local browser (1) selector relative f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface designer reference manual DRM014 rev 0 28 usb and ps/2 multimedia keyboard interface motorola in the device class definition for human interface device (hid) version 1.1. this interface also allows the host system to turn on and off the respective led state indicators, as specified by the 1-byte output report (see table 1-10 ). interface 1 issues power management key or multimedia key input reports, which are distinguished by a unique report id. the power management key uses report id number 1 and the multimedia key uses report id number 2 (see table 1-11 and table 1-12 ). table 1-9. interface 0 input report byte bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0 right gui right alt right shift right control left gui left alt left shift left control 1 reserved 2 keyboard usage id (key code) 3 keyboard usage id (key code) 4 keyboard usage id (key code) 5 keyboard usage id (key code) 6 keyboard usage id (key code) 7 keyboard usage id (key code) table 1-10. interface 0 output report byte bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0 kana compose scroll lock caps lock num lock table 1-11. interface 1 power key input report byte bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0 report id = 1 1 power wake sleep f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface firmware files DRM014 rev 0 designer reference manual motorola usb and ps/2 multimedia keyboard interface 29 table 1-13 shows some input report examples. report id is not used in interface 0. the first byte is the modifier byte and is set on bit basis. whenever a modifier key is pressed, the corresponding bit is set to one. for example, if the left control and the character a keys are pressed, the first byte of the report equals $01, the second byte is reserved, the third byte equals $04, and the forth to the eight bytes equal $00. power management keys are reported through interface 1 with report id 1. for example, if the wake key is pressed, the first byte of the report id equals $01, and the second byte equals $02 since the wake key is defined as bit 2 of the second byte hot keys are reported through interface 1 with reported id 2. for example, if hot key 0 and hot key 17 are pressed, the first byte of report id equals $02, the second byte equals $01 since hot key 0 is pressed, the third byte equals $00 since hot keys 8 to 16 are not pressed, and the forth byte equals $02 since the hot key 17 is pressed. 1.6 firmware files firmware is compiled under casm08z.exe ver 3.16 from p&e microcomputer systems, inc. table 1-14 summarizes the functions of each firmware files: table 1-12. interface 1 multimedia key input report byte bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0 report id = 2 1 m7m6m5m4m3m2m1m0 2 m15 m14 m13 m12 m11 m10 m9 m8 3 m23 m22 m21 m20 m19 m18 m17 m16 4 reserved for m24 - m31 table 1-13. input report examples keys pressed endpoint in report data left control , a 1 $01,$00,$04,$00,$00,$00,$00,$00 left control, right alt, a , b 1 $41,$00,$04,$05,$00,$00,$00,$00 wake 2 $01,$02 hot key 0 & hot key 17 2$0 2 ,$0 1,$00,$02 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface designer reference manual DRM014 rev 0 30 usb and ps/2 multimedia keyboard interface motorola 1.7 test description ? the solution was tested under different windows operating systems on several brands of pcs. ? usb compliance test using command verifier beta version. ? compatibility tests under windows 98se, 2000 and xp. ? compatibility tests under amd 750, intel 810 and 845 chip set desktops, and ibm thinkpad 570, 600e, 600x and t23. 1.8 customization 1.8.1 hardware ? leave unused row and column lines unconnected since they are pulled high by internal resistors. table 1-14. input report examples files functions jb8-psu.asm define constants and variables usb and ps/2 detection ps/2 main program ps/2 key handler ps2-scan.asm ps/2 key scan ps2-key.asm ps/2 key matrix definition jb8-usb.asm usb main program usb endpoint 1 and endpoint 2 transmit setting suspend and resume handler timer interrupt usb-scan.asm usb key scan usb key handler usb-key.asm usb key matrix hid-kbd.asm usb standard device requests handler hid class requests handler jb8-int.asm usb interrupt usb control transfer handler jb8-kbd.h device, configure, interface, hid, endpoint, string and report descriptors jb8-eqs.h jb8 registers and memory definitions f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface extra features DRM014 rev 0 designer reference manual motorola usb and ps/2 multimedia keyboard interface 31 1.8.2 firmware ? modify the key matrix tables in "ps2-key.asm" and "usb-key.asm" according to customized key matrix layout ? change vendor id, product id and product revision number in the device descriptor table in "usb-key.h" ? change vendor name and product name in the string descriptor table in "usb-key.h" ? change the report descriptor in "usb-key.h" if necessary. 1.9 extra features 1.10 further information 1.10.1 related documents mc68hc908jb8 technical data device class definition for human interface device (hid), version 1.1 keyboard scan code specification from microsoft support for enhanced keyboard features under windows 2000 and windows me usb hid usage table f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . usb and ps/2 multimedia keyboard interface designer reference manual DRM014 rev 0 32 usb and ps/2 multimedia keyboard interface motorola 1.11 schematics figure 1-16. keyboard schematics 100nf f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . DRM014 rev 0.0 designer reference manual motorola glossary 33 designer reference manual DRM014 section 2. glossary a see accumulator (a). accumulator (a) an 8-bit general-purpose register in the cpu08. the cpu08 uses the accumulator to hold operands and results of arithmetic and logic operations. acquisition mode a mode of pll operation during startup before the pll locks on a frequency. also see "tracking mode." address bus the set of wires that the cpu or dma uses to read and write memory locations. addressing mode the way that the cpu determines the operand address for an instruction. the m68hc08 cpu has 16 addressing modes. alu see arithmetic logic unit (alu). arithmetic logic unit (alu) the portion of the cpu that contains the logic circuitry to perform arithmetic, logic, and manipulation operations on operands. asynchronous refers to logic circuits and operations that are not synchronized by a common reference signal. baud rate the total number of bits transmitted per unit of time. bcd see binary-coded decimal (bcd). binary relating to the base 2 number system. binary number system the base 2 number system, having two digits, 0 and 1. binary arithmetic is convenient in digital circuit design because digital circuits have two permissible voltage levels, low and high. the binary digits 0 and 1 can be interpreted to correspond to the two digital voltage levels. binary-coded decimal (bcd) a notation that uses 4-bit binary numbers to represent the 10 decimal digits and that retains the same positional structure of a decimal number. for example, 234 (decimal) = 0010 0011 0100 (bcd) bit a binary digit. a bit has a value of either logic 0 or logic 1. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . glossary designer reference manual DRM014 rev 0.0 34 glossary motorola branch instruction an instruction that causes the cpu to continue processing at a memory location other than the next sequential address. break module a module in the m68hc08 family. the break module allows software to halt program execution at a programmable point in order to enter a background routine. breakpoint a number written into the break address registers of the break module. when a number appears on the internal address bus that is the same as the number in the break address registers, the cpu executes the software interrupt instruction (swi). break interrupt a software interrupt caused by the appearance on the internal address bus of the same value that is written in the break address registers. bus a set of wires that transfers logic signals. bus clock the bus clock is derived from the cgmout output from the cgm. the bus clock frequency, f op , is equal to the frequency of the oscillator output, cgmxclk, divided by four. byte a set of eight bits. c the carry/borrow bit in the condition code register. the cpu08 sets the carry/borrow bit when an addition operation produces a carry out of bit 7 of the accumulator or when a subtraction operation requires a borrow. some logical operations and data manipulation instructions also clear or set the carry/borrow bit (as in bit test and branch instructions and shifts and rotates). ccr see condition code register. central processor unit (cpu) the primary functioning unit of any computer system. the cpu controls the execution of instructions. cgm see clock generator module (cgm). clear to change a bit from logic 1 to logic 0; the opposite of set. clock a square wave signal used to synchronize events in a computer. clock generator module (cgm) a module in the m68hc08 family. the cgm generates a base clock signal from which the system clocks are derived. the cgm may include a crystal oscillator circuit and or phase-locked loop (pll) circuit. comparator a device that compares the magnitude of two inputs. a digital comparator defines the equality or relative differences between two binary numbers. computer operating properly module (cop) a counter module in the m68hc08 family that resets the mcu if allowed to overflow. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . glossary DRM014 rev 0.0 designer reference manual motorola glossary 35 condition code register (ccr) an 8-bit register in the cpu08 that contains the interrupt mask bit and five bits that indicate the results of the instruction just executed. control bit one bit of a register manipulated by software to control the operation of the module. control unit one of two major units of the cpu. the control unit contains logic functions that synchronize the machine and direct various operations. the control unit decodes instructions and generates the internal control signals that perform the requested operations. the outputs of the control unit drive the execution unit, which contains the arithmetic logic unit (alu), cpu registers, and bus interface. cop see "computer operating properly module (cop)." counter clock the input clock to the tim counter. this clock is the output of the tim prescaler. cpu see central processor unit (cpu). cpu08 the central processor unit of the m68hc08 family. cpu clock the cpu clock is derived from the cgmout output from the cgm. the cpu clock frequency is equal to the frequency of the oscillator output, cgmxclk, divided by four. cpu cycles a cpu cycle is one period of the internal bus clock, normally derived by dividing a crystal oscillator source by two or more so the high and low times will be equal. the length of time required to execute an instruction is measured in cpu clock cycles. cpu registers memory locations that are wired directly into the cpu logic instead of being part of the addressable memory map. the cpu always has direct access to the information in these registers. the cpu registers in an m68hc08 are: ? a (8-bit accumulator) ? h:x (16-bit index register) ? sp (16-bit stack pointer) ? pc (16-bit program counter) ? ccr (condition code register containing the v, h, i, n, z, and c bits) csic customer-specified integrated circuit cycle time the period of the operating frequency: t cyc =1/f op . decimal number system base 10 numbering system that uses the digits zero through nine. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . glossary designer reference manual DRM014 rev 0.0 36 glossary motorola direct memory access module (dma) a m68hc08 family module that can perform data transfers between any two cpu-addressable locations without cpu intervention. for transmitting or receiving blocks of data to or from peripherals, dma transfers are faster and more code-efficient than cpu interrupts. dma see "direct memory access module (dma)." dma service request a signal from a peripheral to the dma module that enables the dma module to transfer data. duty cycle a ratio of the amount of time the signal is on versus the time it is off. duty cycle is usually represented by a percentage. eeprom electrically erasable, programmable, read-only memory. a nonvolatile type of memory that can be electrically reprogrammed. eprom erasable, programmable, read-only memory. a nonvolatile type of memory that can be erased by exposure to an ultraviolet light source and then reprogrammed. exception an event such as an interrupt or a reset that stops the sequential execution of the instructions in the main program. external interrupt module (irq) a module in the m68hc08 family with both dedicated external interrupt pins and port pins that can be enabled as interrupt pins. fetch to copy data from a memory location into the accumulator. firmware instructions and data programmed into nonvolatile memory. free-running counter a device that counts from zero to a predetermined number, then rolls over to zero and begins counting again. full-duplex transmission communication on a channel in which data can be sent and received simultaneously. h the upper byte of the 16-bit index register (h:x) in the cpu08. h the half-carry bit in the condition code register of the cpu08. this bit indicates a carry from the low-order four bits of the accumulator value to the high-order four bits. the half-carry bit is required for binary-coded decimal arithmetic operations. the decimal adjust accumulator (daa) instruction uses the state of the h and c bits to determine the appropriate correction factor. hexadecimal base 16 numbering system that uses the digits 0 through 9 and the letters a through f. high byte the most significant eight bits of a word. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . glossary DRM014 rev 0.0 designer reference manual motorola glossary 37 illegal address an address not within the memory map illegal opcode a nonexistent opcode. i the interrupt mask bit in the condition code register of the cpu08. when i is set, all interrupts are disabled. index register (h:x) a 16-bit register in the cpu08. the upper byte of h:x is called h. the lower byte is called x. in the indexed addressing modes, the cpu uses the contents of h:x to determine the effective address of the operand. h:x can also serve as a temporary data storage location. input/output (i/o) input/output interfaces between a computer system and the external world. a cpu reads an input to sense the level of an external signal and writes to an output to change the level on an external signal. instructions operations that a cpu can perform. instructions are expressed by programmers as assembly language mnemonics. a cpu interprets an opcode and its associated operand(s) and instruction. interrupt a temporary break in the sequential execution of a program to respond to signals from peripheral devices by executing a subroutine. interrupt request a signal from a peripheral to the cpu intended to cause the cpu to execute a subroutine. i/o see input/output (i/0). irq see "external interrupt module (irq)." jitter short-term signal instability. latch a circuit that retains the voltage level (logic 1 or logic 0) written to it for as long as power is applied to the circuit. latency the time lag between instruction completion and data movement. least significant bit (lsb) the rightmost digit of a binary number. logic 1 a voltage level approximately equal to the input power voltage (v dd ). logic 0 a voltage level approximately equal to the ground voltage (v ss ). low byte the least significant eight bits of a word. low voltage inhibit module (lvi) a module in the m68hc08 family that monitors power supply voltage. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . glossary designer reference manual DRM014 rev 0.0 38 glossary motorola lvi see "low voltage inhibit module (lvi)." m68hc08 a motorola family of 8-bit mcus. mark/space the logic 1/logic 0 convention used in formatting data in serial communication. mask 1. a logic circuit that forces a bit or group of bits to a desired state. 2. a photomask used in integrated circuit fabrication to transfer an image onto silicon. mask option a optional microcontroller feature that the customer chooses to enable or disable. mask option register (mor) an eprom location containing bits that enable or disable certain mcu features. mcu microcontroller unit. see microcontroller. memory location each m68hc08 memory location holds one byte of data and has a unique address. to store information in a memory location, the cpu places the address of the location on the address bus, the data information on the data bus, and asserts the write signal. to read information from a memory location, the cpu places the address of the location on the address bus and asserts the read signal. in response to the read signal, the selected memory location places its data onto the data bus. memory map a pictorial representation of all memory locations in a computer system. microcontroller microcontroller unit (mcu). a complete computer system, including a cpu, memory, a clock oscillator, and input/output (i/o) on a single integrated circuit. modulo counter a counter that can be programmed to count to any number from zero to its maximum possible modulus. monitor rom a section of rom that can execute commands from a host computer for testing purposes. mor see "mask option register (mor)." most significant bit (msb) the leftmost digit of a binary number. multiplexer a device that can select one of a number of inputs and pass the logic level of that input on to the output. n the negative bit in the condition code register of the cpu08. the cpu sets the negative bit when an arithmetic operation, logical operation, or data manipulation produces a negative result. nibble a set of four bits (half of a byte). f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . glossary DRM014 rev 0.0 designer reference manual motorola glossary 39 object code the output from an assembler or compiler that is itself executable machine code, or is suitable for processing to produce executable machine code. opcode a binary code that instructs the cpu to perform an operation. open-drain an output that has no pullup transistor. an external pullup device can be connected to the power supply to provide the logic 1 output voltage. operand data on which an operation is performed. usually a statement consists of an operator and an operand. for example, the operator may be an add instruction, and the operand may be the quantity to be added. oscillator a circuit that produces a constant frequency square wave that is used by the computer as a timing and sequencing reference. otprom one-time programmable read-only memory. a nonvolatile type of memory that cannot be reprogrammed. overflow a quantity that is too large to be contained in one byte or one word. page zero the first 256 bytes of memory (addresses $0000C$00ff). parity an error-checking scheme that counts the number of logic 1s in each byte transmitted. in a system that uses odd parity, every byte is expected to have an odd number of logic 1s. in an even parity system, every byte should have an even number of logic 1s. in the transmitter, a parity generator appends an extra bit to each byte to make the number of logic 1s odd for odd parity or even for even parity. a parity checker in the receiver counts the number of logic 1s in each byte. the parity checker generates an error signal if it finds a byte with an incorrect number of logic 1s. pc see program counter (pc). peripheral a circuit not under direct cpu control. phase-locked loop (pll) a oscillator circuit in which the frequency of the oscillator is synchronized to a reference signal. pll see "phase-locked loop (pll)." pointer pointer register. an index register is sometimes called a pointer register because its contents are used in the calculation of the address of an operand, and therefore points to the operand. polarity the two opposite logic levels, logic 1 and logic 0, which correspond to two different voltage levels, v dd and v ss . polling periodically reading a status bit to monitor the condition of a peripheral device. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . glossary designer reference manual DRM014 rev 0.0 40 glossary motorola port a set of wires for communicating with off-chip devices. prescaler a circuit that generates an output signal related to the input signal by a fractional scale factor such as 1/2, 1/8, 1/10 etc. program a set of computer instructions that cause a computer to perform a desired operation or operations. program counter (pc) a 16-bit register in the cpu08. the pc register holds the address of the next instruction or operand that the cpu will use. pull an instruction that copies into the accumulator the contents of a stack ram location. the stack ram address is in the stack pointer. pullup a transistor in the output of a logic gate that connects the output to the logic 1 voltage of the power supply. pulse-width the amount of time a signal is on as opposed to being in its off state. pulse-width modulation (pwm) controlled variation (modulation) of the pulse width of a signal with a constant frequency. push an instruction that copies the contents of the accumulator to the stack ram. the stack ram address is in the stack pointer. pwm period the time required for one complete cycle of a pwm waveform. ram random access memory. all ram locations can be read or written by the cpu. the contents of a ram memory location remain valid until the cpu writes a different value or until power is turned off. rc circuit a circuit consisting of capacitors and resistors having a defined time constant. read to copy the contents of a memory location to the accumulator. register a circuit that stores a group of bits. reserved memory location a memory location that is used only in special factory test modes. writing to a reserved location has no effect. reading a reserved location returns an unpredictable value. reset to force a device to a known condition. rom read-only memory. a type of memory that can be read but cannot be changed (written). the contents of rom must be specified before manufacturing the mcu. sci see "serial communication interface module (sci)." serial pertaining to sequential transmission over a single line. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . glossary DRM014 rev 0.0 designer reference manual motorola glossary 41 serial communications interface module (sci) a module in the m68hc08 family that supports asynchronous communication. serial peripheral interface module (spi) a module in the m68hc08 family that supports synchronous communication. set to change a bit from logic 0 to logic 1; opposite of clear. shift register a chain of circuits that can retain the logic levels (logic 1 or logic 0) written to them and that can shift the logic levels to the right or left through adjacent circuits in the chain. signed a binary number notation that accommodates both positive and negative numbers. the most significant bit is used to indicate whether the number is positive or negative, normally logic 0 for positive and logic 1 for negative. the other seven bits indicate the magnitude of the number. software instructions and data that control the operation of a microcontroller. software interrupt (swi) an instruction that causes an interrupt and its associated vector fetch. spi see "serial peripheral interface module (spi)." stack a portion of ram reserved for storage of cpu register contents and subroutine return addresses. stack pointer (sp) a 16-bit register in the cpu08 containing the address of the next available storage location on the stack. start bit a bit that signals the beginning of an asynchronous serial transmission. status bit a register bit that indicates the condition of a device. stop bit a bit that signals the end of an asynchronous serial transmission. subroutine a sequence of instructions to be used more than once in the course of a program. the last instruction in a subroutine is a return from subroutine (rts) instruction. at each place in the main program where the subroutine instructions are needed, a jump or branch to subroutine (jsr or bsr) instruction is used to call the subroutine. the cpu leaves the flow of the main program to execute the instructions in the subroutine. when the rts instruction is executed, the cpu returns to the main program where it left off. synchronous refers to logic circuits and operations that are synchronized by a common reference signal. tim see "timer interface module (tim)." f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . glossary designer reference manual DRM014 rev 0.0 42 glossary motorola timer interface module (tim) a module used to relate events in a system to a point in time. timer a module used to relate events in a system to a point in time. toggle to change the state of an output from a logic 0 to a logic 1 or from a logic 1 to a logic 0. tracking mode mode of low-jitter pll operation during which the pll is locked on a frequency. also see "acquisition mode." twos complement a means of performing binary subtraction using addition techniques. the most significant bit of a twos complement number indicates the sign of the number (1 indicates negative). the twos complement negative of a number is obtained by inverting each bit in the number and then adding 1 to the result. unbuffered utilizes only one register for data; new data overwrites current data. unimplemented memory location a memory location that is not used. writing to an unimplemented location has no effect. reading an unimplemented location returns an unpredictable value. executing an opcode at an unimplemented location causes an illegal address reset. v the overflow bit in the condition code register of the cpu08. the cpu08 sets the v bit when a two's complement overflow occurs. the signed branch instructions bgt, bge, ble, and blt use the overflow bit. variable a value that changes during the course of program execution. vco see "voltage-controlled oscillator." vector a memory location that contains the address of the beginning of a subroutine written to service an interrupt or reset. voltage-controlled oscillator (vco) a circuit that produces an oscillating output signal of a frequency that is controlled by a dc voltage applied to a control input. waveform a graphical representation in which the amplitude of a wave is plotted against time. wired-or connection of circuit outputs so that if any output is high, the connection point is high. word a set of two bytes (16 bits). write the transfer of a byte of data from the cpu to a memory location. x the lower byte of the index register (h:x) in the cpu08. z the zero bit in the condition code register of the cpu08. the cpu08 sets the zero bit when an arithmetic operation, logical operation, or data manipulation produces a result of $00. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . how to reach us: usa/europe/locations not listed: motorola literature distribution; p.o. box 5405, denver, colorado 80217 1-303-675-2140 or 1-800-441-2447 japan: motorola japan ltd.; sps, technical information center, 3-20-1, minami-azabu minato-ku, tokyo 106-8573 japan 81-3-3440-3569 asia/pacific: motorola semiconductors h.k. ltd.; silicon harbour centre, 2 dai king street, tai po industrial estate, tai po, n.t., hong kong 852-26668334 technical information center: 1-800-521-6274 home page: http://motorola.com/semiconductors information in this document is provided solely to enable system and software implementers to use motorola products. there are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document. motorola reserves the right to make changes without further notice to any products herein. motorola makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does motorola assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. typical parameters which may be provided in motorola data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. all operating parameters, including typicals must be validated for each customer application by customers technical experts. motorola does not convey any license under its patent rights nor the rights of others. motorola products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the motorola product could create a situation where personal injury or death may occur. should buyer purchase or use motorola products for any such unintended or unauthorized application, buyer shall indemnify and hold motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that motorola was negligent regarding the design or manufacture of the part. motorola and the stylized m logo are registered in the u.s. patent and trademark office. digital dna is a trademark of motorola, inc. all other product or service names are the property of their respective owners. motorola, inc. is an equal opportunity/affirmative action employer. ? motorola, inc. 2003 DRM014/d f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . |
Price & Availability of DRM014
![]() |
|
|
All Rights Reserved © IC-ON-LINE 2003 - 2022 |
[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy] |
Mirror Sites : [www.datasheet.hk]
[www.maxim4u.com] [www.ic-on-line.cn]
[www.ic-on-line.com] [www.ic-on-line.net]
[www.alldatasheet.com.cn]
[www.gdcy.com]
[www.gdcy.net] |