MC68HC705P6A Features
28-Pin Plastic DIP, Ceramic DIP, and SOIC Packages
2.1 MHz Maximum Operating Frequency at 5 Volts
16-Bit Timer with Input Capture, Output Compare, and Counter Overflow
Computer Operating Properly (COP) Watchdog Timer
Full Duplex, Bidirectional Serial Input/Output Port (SIOP) with 4 Baud Rates
4-Channel, 8-Bit Analog-to-Digital Converter
21 Discrete Input/Output Pins
- 20 Bidirectional Pins (Port A[7:0], Port C[7:0], Port D5)
- 1 Input Only Pin (Port D7)
- Software Programmable Pullup Devices on Port A[7:0]
- Optional Active High Interrupt Capability on Port A[7:0]
- 10 mA Current Sink Capability on Port C[1:0]
Notes:
Based on a Motorola University Design Contest entry, this next example makes extensive use of the features found on the MC68HC705P6A. The peripherals used in this application (analog-to-digital converter, timer, serial input/output port, and I/O pins) are found on many different 68HC05 devices.
With three of the analog-to-digital converter’s (ADC) four channels, the cycling computer monitors rider heart rate, air temperature, and ambient humidity. If desired, the remaining ADC channel could be used to monitor the cycling computer’s battery voltage.
Bicycle speed and distance traveled are calculated using the 16-bit timer’s overflow and input capture functions. The output compare function synchronizes ADC operation.
This information are gathered and shown on a serially interfaced liquid crystal display (LCD) driven by the MC68HC705P6A serial input/output port (SIOP). Pushbuttons connected to the port A inputs (with optional pullup devices and interrupt capability enabled) allow the user to cycle through the different statistics displayed, start and stop an elapsed time counter, and adjust certain operating parameters. The cycling computer must know tire size, for example, to accurately calculate speed and distance traveled