Академический Документы
Профессиональный Документы
Культура Документы
Objectives
MSSP module
Master synchronous module is a serial interface. Useful for communicating with other peripheral or microcontroller devices. These peripheral devices may be serial EEPROMs, shift registers, display drivers, A/D converters, etc.
MSSP module
The MSSP module can operate in one of two modes:
Control registers
The MSSP module has three associated registers. These include a status register (SSPSTAT) and two control registers (SSPCON1 and SSPCON2). The use of these registers and their individual configuration bits differ significantly depending on whether the MSSP module is operated in SPI or I2C mode.
SPI mode
Originally started by Motorola Corp. Used in many devices such as ADC,DAC, EEPROM etc. The SPI mode allows 8 bits of data to be synchronously transmitted and received simultaneously. To accomplish communication, typically three pins are used: Serial Data Out (SDO) RC5/SDO Serial Data In (SDI) RC4/SDI/SDA Serial Clock (SCK) RC3/SCK/SCL
D7 bit of address byte is always HIGH (1) for write D7 bit of address byte is always LOW (0) for read
Timing
Control registers
Status register
Connections
Assignments: PIC18F4520
1.
2. 3. 4.
5.
Develop the C program for interfacing DS1306 RTC interfacing, and simulate results on proteus. Simulate the capture mode programming. Simulate the compare mode programming. Interface DC motor using PWM , for different duty cycles. Use the above code to implement a water fountain.
Assignments: PIC18F4520
6. Implement up-down counter using RTC DS1306 and LCD 16x2. 7. Implement stop-watch using RTC, LCD and keys. 8. Study and implement ALARM features of DS1306 in assembly and C.