User manual
PICkit™ Serial Analyzer User’s Guide
DS51647A-page 108 © 2007 Microchip Technology Inc.
TABLE B-1: FIRMWARE MODULES
B.5 I
2
C COMMUNICATIONS
B.5.1 Overview
The 28-Pin Demo Board I
2
C™ Demo responds to three I
2
C slave addresses:
All devices (slave addresses) respond to the I
2
C protocols described below. Each slave
device supports a fixed number of word addresses (see section B.6 Slave Devices
below). The word address is automatically incremented during a transaction for
sequential access of the device registers. If the word address is incremented beyond
the end of the supported address range, the address will “wrap”.
B.5.2 Protocols
Figure B-1 shows the Master and Slave legend used for Figures B-2 through B-4.
FIGURE B-1: MASTER/SLAVE DEVICE LEGEND
Write Byte(s)
– This transaction is used to write one or more bytes. The maximum
number of bytes is slave-dependant.
MODULE DESCRIPTION
adc.asm ADC service – measuring channel AN0, connected to potentiometer
RP1, and post results to register in shared memory
device.asm Basic device (microcontroller) configuration
ee_util.asm EEPROM Read/Write routines
exec.asm “Executive” feature set – provides functionality for test and demon-
stration of PICkit™ Serial Analyzer and 28-Pin Demo Board
i2c_slave_pksd.asm I
2
C™ service for three slave devices:
0xA2: Real-Time Clock (RTC)
0xA8: EEPROM
0xAA: Executive (EXEC)
led.asm LED management, set/reset LEDs per state register
main.asm Initialization, Idle loop and Interrupt Service Routine context
management
pksi.asm Monitor PICkit Serial Analyzer interface I/O pins – post results to state
register
rtc.asm I
2
C™ device: real-time clock emulation maintains 16 locations for
register-based I/O
timer0.asm Utilizes TMR0 as a source for multiple “soft” timers
timer1.asm Utilizes TMR1 with external 32 kHz crystal for RTC 1-second ‘ticks’
TABLE B-2: DEVICE SLAVE ADDRESSES
ADDR NAME DESCRIPTION
0xA2 RTC Device emulation: Real-Time Clock
0xA8 EEPROM Device emulation: EEPROM
0xAA EXEC Supervisory features
Master
Slave