ECE 4510/5530 Microcontroller Applications Week 10
|
|
- Shannon Lambert
- 5 years ago
- Views:
Transcription
1 ECE 4510/5530 Microcontroller Applications Week 10 Dr. Bradley J. Bazuin Associate Professor Department of Electrical and Computer Engineering College of Engineering and Applied Sciences
2 ECE 4510/
3 Lab 9 Elements Inter-Integrated Circuit (I2C) Interface SCL and SDA connections Transfers Start Data Acknowledge Stop Calendar MCP7940M-I/P Real-Time Clock/Calendar ECE
4 Lab 8 Note: Serial I/O on multiple pins ECE 4510/5530 4
5 Alternate Pin Connections ECE 4510/5530 5
6 The HCS12 SPI Modules The MC9S12DP256 has three SPI modules: SPI0, SPI1, and SPI2. By default, the SPI0 share the use of the upper 4 Port S pins: PS7 SS0 (can be rerouted to PM3) PS6 SCK0 (can be rerouted to PM5) PS5 MOSI0 (can be rerouted to PM4) PS4 MISO0 (can be rerouted to PM2) By default, the SPI1 shares the use of the lower 4 Port P pins: PP3 SS1 (can be rerouted to PH3) PP2 SCK1 (can be rerouted to PH2) PP1 MOSI1 (can be rerouted to PH1) PP0 MISO1 (can be rerouted to PH0) By default, the SPI2 shares the use of the upper 4 Port P pins: PP6 SS2 (can be rerouted to PH7) PP7 SCK2 (can be rerouted to PH6) PP5 MOSI2 (can be rerouted to PH5) PP4 MISO2 (can be rerouted to PH4) It is important to make sure that there is no conflict in the use of signal pins when making rerouting decision. ECE
7 Module Routing Register The MODRR configures the re-routing of CAN0, CAN4, SPI0, SPI1, and SPI2 on defined port pins. ECE 4510/5530 7
8 SPI0 Pin Selection MODRR[4] Default Alternate ECE 4510/5530 8
9 SPI1 and SPI2 Pin Selection MODRR[5:6] Default Alternate ECE 4510/5530 9
10 Chapter 11: Inter-Integrated Circuit (I 2 C) ECE 4510/
11 Inter-Integrated Circuit (I2C) Inter-Integrated Circuit (I2C) Interface Synchronous (fast, but with pull-ups required) More than 8-bits at a time Multiple devices can communicate using the same serial lines Bi-directional data transfer Does not require a single master ECE
12 Byte Level Transfer Every byte put on the SDA line must be eight bits long. The number of bytes that can be transmitted per transfer is unrestricted. Each byte must be followed by an Acknowledge bit. Data is transferred with the Most Significant Bit (MSB) first (see Figure 6). If a slave cannot receive or transmit another complete byte of data until it has performed some other function, it can hold the clock line SCL LOW to force the master into a wait state. Data transfer then continues when the slave is ready for another byte of data and releases clock line SCL. ECE 4510/5530 NXP, I2C-bus specification and user manual, Rev. 5 9 October
13 Data Transfer Format: Write Master transmitter to slave receiver shown in Figure
14 Data Transfer Format: Read Master reads slave immediately after the first byte (address byte) shown in Figure
15 An Overview of the HCS12 I2C Module The HCS12 I2C implements a subset of the I2C protocol. Provides interrupts on start and stop bits in hardware to determine if the I2C bus is free. Supports only 7-bit addressing Supports 100 kbps baud rate but requires the user to limit the slew rate to no higher than 100 ns if the 400 kbps baud is to be used. Limit the maximum bus capacitance to 400 pf for all conditions.
16 IIC Block Diagram Registers
17 Example 1 Case 1: 100 khz SCL divider = 240 From table in text: MUL = 1, IBC[7:0]=0x1F SDA Hold = 33 clocks (1.375 usec < 3.45 usec max spec) SCL Hold (start) = 118 clocks (4.92 usec > 4.0 usec min spec) SCL Hold (stop) = 121 clocks (5.04 usec > 4.0 usec min spec) Notes: 4 usec min more than 96 clocks 3.45 usec max less than 82.8 clocks 4.7 usec min from spec more than clocks ECE 4510/
18 I2C Initialization Compute an appropriate value and write it into the IBFD register. Load a value into the IBAD register if the MCU may operate in slave mode. Set the IBEN bit of the IBCR register to enable I2C module. Modify the bits of the IBCR register to select master/slave mode, transmit/receive mode, and interrupt enable mode void openi2c (char ibc, char i2c_id) { IBCR = IBEN; /* enable I2C module, slave receive */ IBFD = 0x1F; /* set up I2C baud rate */ IBAD = i2c_id; /* set up slave address */ IBCR &= ~IBIE; /* disable I2C interrupt */ IBCR = IBSWAI; /* disable I2C in wait mode */ } ECE 4510/
19 I2C Master Addressing Check to insure the bus is not busy (IBSR bit IBB). Send start condition as master (IBCR bits MSSL and Transmit) Send address and wait for the transmission to complete. Modify the bits of the IBCR register to select master/slave mode, transmit/receive mode, and interrupt enable mode char sendslaveid (char cx char RdWrn) { while (IBSR&IBB); /* wait until I2C bus is idle */ IBCR = TXRX+MSSL; /* generate a start condition */ IBDR = cx RdWrn; /* send out the slave address with R/W bit */ while(!(ibsr & IBIF)); /* wait for address transmission to complete */ IBSR = IBIF; /* clear IBIF flag */ return(ibsr & RXAK); /* return the status of the acknowledge */ } ECE 4510/
20 I2C Master Sending Byte Check to insure the address acknowledge was received Send data and wait for the transmission to complete. Send Stop Condition if(sendslaveid(address_isc_device 0x00)) { IBCR &= ~MSSL; /* generate stop condition */ error_condition. } else { IBDR = write_data; /* send out the value cx */ while (!(IBSR & IBIF)); /* wait until the byte is shifted out */ IBSR = IBIF; /* clear the IBIF flag */ if(ibsr & RXAK) ACK_ERR = 1; /* status of the acknowledge */ IBCR &= ~MSSL; /* generate stop condition */ } ECE 4510/
21 I2C Master Reading Byte Check to insure the address acknowledge was received Place device in receive mode and perform dummy read Receive and provide NACK to end communications. Send Stop Condition if(sendslaveid(address_isc_device 0x01)) { IBCR &= ~MSSL; /* generate stop condition */ error_condition. } else { IBCR &= ~(TXRX + TXAK); /* prepare to receive and acknowledge */ IBCR = TXAK; /* prepare to not acknowledge */ dummy = IBDR; /* a dummy read */ while(!(ibsr & IBIF)); /* wait for the byte to shift in */ IBSR = IBIF; /* clear the IBIF flag */ IBCR &= ~MSSL; /* generate stop condition */ buf = IBDR; /* place the received byte in buf */ } ECE 4510/
22 Suggested Code Routines Transmit one byte Transmit multiple bytes Receive one byte Receive multiple bytes ECE 4510/
23 I2C Real-Time Clock/Calendar MCP7940M Features Real-Time Clock/Calendar (RTCC): Hours, Minutes, Seconds, Day of Week, Day, Month and Year Dual alarm with single output On-Chip Digital Trimming/Calibration: Range -127 to +127 ppm, Resolution 1 ppm Programmable Open-Drain Output Control: CLKOUT with 4 selectable frequencies Alarm output 64 Bytes SRAM Low-Power CMOS Technology: Dynamic Current: 400 A max write 100 khz and 400 khz Compatibility ESD Protection >4,000V Packages include 8-Lead SOIC, TSSOP, 2x3 TDFN, MSOP and PDIP Temperature Ranges: Industrial (I): -40 C to +85 C
24 Typical Application Schematic
25 MCP7940M Address Map Time and Data Region (same as text ) Configuration (similar to text ) Calibration Alarm 0 Alarm 1 64 Byte SRAM Clock/Calendars are often designed with battery backup. Therefore, the 64 Byte SRAM is available for user nonvolatile storage.
26 MCP7940M Address Map Detail Same as textbook Extra bits Matches clock structure Matches clock structure
27 MCP7940M Control Register Bit 7 is the OUT bit. This sets the logic level on the MFP when not using this as a square wave output. Bit 6 is the SQWE bit. Setting this bit enables the divided output from the crystal oscillator. Bits 5:4 determine which alarms are active. 00 No Alarms are active 01 Alarm 0 is active 10 Alarm 1 is active 11 Both Alarms are active Bit 3 is the EXTOSC enable bit. Setting this bit will allow an external khz signal to drive the RTCC registers, eliminating the need for an external crystal. Bit 2:0 sets the internal divider for the khz oscillator to be driven to the MFP. The duty cycle is 50%. The output is responsive to the Calibration register. The following frequencies are available: Hz khz khz khz 1xx enables the Cal output function. Cal output appears on MFP if SQWE is set (64 Hz Nominal). See Section Calibration for more details.
28 MCP7940M Calibration Register Register 0x08h is the Calibration register. This is an 8-bit register that is used to add or subtract clocks from the RTCC counter every minute. The MSB is the sign bit and indicates if the count should be added or subtracted. The remaining 7 bits, with each bit adding or subtracting 2 clocks, give the user the ability to add or subtract up to 254 clocks per minute.
29 MCP7940M Alarms 0x07h Is the Control register. Bits 5:4 determine which alarms are active. 00 No Alarms are active 01 Alarm 0 is active 10 Alarm 1 is active 11 Both Alarms are active Locations 0x0Dh and 0x14h have additional bits for alarm configuration. ALMxPOL: This bit specifies the level that the MFP will drive when the alarm is triggered. ALM2POL is a copy of ALM1POL. The default state of the MFP when used for alarms is the inverse of ALM1POL. ALMxIF: This is the Alarm Interrupt Fag. This bit is set in hardware if the alarm was triggered. The bit is cleared in software. ALMxC2:0: These Configuration bits determine the alarm match. The logic will trigger the alarm based on one of the following match conditions 000 Seconds match 001 Minutes match 010 Hours match (takes into account 12/24 hour) 011 Matches the current day, interrupt at a.m. 100 Date 111 Seconds, Minutes, Hour, Day, Date, Month
30 Crystal Spec and Design Note p. 14 This is a description of the capacitor selection when using an external crystal. We are not going to bother with this as it should work without it, but to configure for the highest accuracy and stability, you would normally use the capacitors shown. ECE 4510/
31 MCP7940M I2C Data Transfer MCP7940M supports both 100 khz and 400 khz data transfer. The device address (ID) of the MCP7940M is
32 Example 11.3 Write a function to configure the DS1307 to operate with the following setting: SQWOUT output enabled SQWOUT output set to 1 Hz SQWOUT idle high when it is disabled Control byte passed in B Solution: char openrtcc(char ctrl) { char status; status = sendslaveid(0xde 0x00); /* send out DS1307's ID and write*/ if (status) return -1; /* if did not acknowledge, return error code */ IBDR = 0x07; /* send out control register address */ while(!(ibsr & IBIF)); /* wait for end of transmission */ IBSR = IBIF; /* clear IBIF flag */ if (IBSR & RXAK) return -1; /* if did not acknowledge, return error code */ IBDR = ctrl; /* send out control byte */ while(!(ibsr & IBIF)); IBSR = IBIF; if (IBSR & RXAK) return -1; /* if did not acknowledge, return error code */ IBCR &= ~MSSL; /* generate a stop condition */ return 0; }
33 Example 11.5 Write a function to send the time and calendar information to the DS1307. The time and calendar information is pointed to by X. The device ID and the starting register address are passed in A and B, respectively. X points to the value of year and the second s value is located at [X]+6. Solution: char sendtime (char *ptr, char ID) { char i; sendslaveid(0xde 0x00); /* send ID to DS1307 */ if(ibsr & RXAK) return -1; /* did DS1307 acknowledge? */ IBDR = 0x00; /* send out seconds register address */ while(!(ibsr & IBIF)); IBSR = IBIF; /* clear IBIF flag */ if(ibsr & RXAK) return -1; for(i = 6; i >= 0; i--) { /* send year first, send second last */ IBDR = *(ptr+i); while(!(ibsr&ibif)); IBSR = IBIF; if(ibsr & RXAK) return -1; } IBCR &= ~MSSL; /* generate a stop condition */ return 0; }
34 Example 11.6 Write a C function to read the time of day from the DS1307 and save it in the array cur_time[0 6]. Solution: char readtime(char cx) { char i, temp; sendslaveid(0xde, 0x00); /* generate a start condition and send DS1307's ID */ if (IBSR & RXAK) return -1; /* if did not respond, return error code * IBDR = cx; /* send address of seconds register */ while(!(ibsr & IBIF)); IBSR = IBIF; /* clear the IBIF flag */ if (IBSR & RXAK) return -1; /* if did not respond, return error code */ IBCR = RSTA; /* generate a restart condition */ IBDR = 0xDE 0x01; /* send ID and set R/W flag to read */ while(!(ibsr & IBIF)); IBSR = IBIF; if (IBSR & RXAK) return -1; /* if DS1307 did not respond, return error code */
35 Example 11.6 (cont.) } IBCR &= ~(TXRX + TXAK); /* prepare to receive and acknowledge */ temp = IBDR; /* a dummy read to trigger 9 clock pulses */ for (i = 0; i < 5; i++) { while(!(ibsr & IBIF)); /* wait for a byte to shift in */ IBSR = IBIF; /* clear the IBIF flag */ cur_time[i] = IBDR; /* save the current time in buffer */ } /* also initiate the next read */ while (!(IBSR & IBIF)); /* wait for the receipt of cur_time[5] */ IBSR = IBIF; /* clear IBIF flag */ IBCR = TXAK; /* not to acknowledge cur_time[6] */ cur_time[5] = IBDR; /* save cur_time[5] and initiate next read */ while (!(IBSR & IBIF)); IBSR = IBIF; IBCR &= ~MSSL; /* generate stop condition */ cur_time[6] = IBDR; return 0;
36 Format Received Time Information void formattime(void) { char temp3; temp3 = cur_time[3] & 0x07; /* extract day-of-week */ if (cur_time[2] & 0x40) { /* if 12-hour mode is used */ hms[0] = 0x30 + ((cur_time[2] & 0x10) >> 4); /* tens hour digit */ hms[1] = 0x30 + (cur_time[2] & 0x0F); /* ones hour digit */ hms[2] = ':'; hms[3] = 0x30 + (cur_time[1] >> 4); /* tens minute digit */ hms[4] = 0x30 + (cur_time[1] & 0x0F); /* ones minute digit */ hms[5] = ':'; hms[6] = 0x30 + ((cur_time[0] & 0x70) >> 4); /* tens second digit */ hms[7] = 0x30 + (cur_time[0] & 0x0F); /* ones second digit */ hms[8] = ':'; if (cur_time[2] & 0x20) hms[9] = 'P'; else hms[9] = 'A'; hms[10] = 'M'; hms[11] = 0; /* terminate the string with a NULL */
37 switch(temp3) { /* convert to day of week */ case 1: mdy[0] = 'S'; mdy[1] = 'U'; break; case 2: mdy[0] = 'M'; mdy[1] = 'O'; break; case 3: mdy[0] = 'T'; mdy[1] = 'U'; break; case 4: mdy[0] = 'W'; mdy[1] = 'E'; break; case 5: mdy[0] = 'T'; mdy[1] = 'H'; break; case 6: mdy[0] = 'F'; mdy[1] = 'R'; break; case 7: mdy[0] = 'S'; mdy[1] = 'A'; break; default: mdy[0] = 0x20; /* space */ mdy[1] = 0x20; break; } mdy[2] = ':'; mdy[3] = 0x30 + (cur_time[5] >> 4); /* month */ mdy[4] = 0x30 + (cur_time[5] & 0x0F); mdy[5] = ':'; mdy[6] = 0x30 + (cur_time[4] >> 4); /* date */ mdy[7] = 0x30 + (cur_time[4] & 0x0F); mdy[8] = ':'; mdy[9] = 0x30 + (cur_time[6] >> 4); /* year */ mdy[10] = 0x30 + (cur_time[6] & 0x0F); mdy[11] = 0; /* NULL character */ } else {/* 24-hour mode */ hms[0] = 0x30 + ((cur_time[2] & 0x30)>>4); /* hours */ hms[1] = 0x30 + (cur_time[2] & 0x0F); hms[2] = ':'; hms[3] = 0x30 + (cur_time[1] >> 4); /* minutes */ hms[4] = 0x30 + (cur_time[1] & 0x0F); hms[5] = ':';
38 hms[6] = 0x30 + ((cur_time[0] & 0x70)>>4); /* seconds */ hms[7] = 0x30 + (cur_time[0] & 0x0F); hms[8] = ':'; switch(temp3) { /* convert to day of week */ case 1: hms[9] = 'S'; hms[10] = 'U'; break; case 2: hms[9] = 'M'; hms[10] = 'O'; break; case 3: hms[9] = 'T'; hms[10] = 'U'; break; case 4: hms[9] = 'W'; hms[10] = 'E'; break; case 5: hms[9] = 'T'; hms[10] = 'H'; break; case 6: hms[9] = 'F'; hms[10] = 'R'; break; } case 7: hms[9] = 'S'; hms[10] = 'A'; break; default: hms[9] = 0x20; /* space */ hms[10] = 0x20; break; } hms[11] = 0; /* NULL character */ mdy[0] = 0x30 + (cur_time[5] >> 4); /* month */ mdy[1] = 0x30 + (cur_time[5] & 0x0F); mdy[2] = ':'; mdy[3] = 0x30 + (cur_time[4] >> 4); /* date */ mdy[4] = 0x30 + (cur_time[4] & 0x0F); mdy[5] = ':'; mdy[6] = 0x30 + (cur_time[6] >> 4); /* year */ mdy[7] = 0x30 + (cur_time[6] & 0x0F); mdy[8] = 0; /* NULL character */ }
The MC9S12 IIC Interface
The MC9S12 IIC Interface The IIC bus can control multiple devices using only two wires The two wires are Clock and Data The devices connect to the wires using a wired ND method The lines are normally high.
More informationHCS12 Inter-Integrated Circuit(IIC) Block Guide V02.06
DOCUMENT NUMBER S12IICV2/D HCS12 Inter-Integrated Circuit(IIC) Block Guide V02.06 Original Release Date: 08 SEP 1999 Revised: Aug 18, 2002 8/16 Bit Division,TSPG Motorola, Inc. Motorola reserves the right
More informationHCS12 Inter-Integrated Circuit(IIC) Block Guide V02.08
DOCUMENT NUMBER S12IICV2/D HCS12 Inter-Integrated Circuit(IIC) Block Guide V02.08 Original Release Date: 08 SEP 1999 Revised: Jun 3, 2004 8/16 Bit Division,TSPG Motorola, Inc. Motorola reserves the right
More informationDallas Semiconductor DS1307 Real Time Clock. The DS 1307 is a real-time clock with 56 bytes of NV (nonvolatile)
Using the MC9S12 IIC Bus with DS 1307 Real Time Clock DS1307 Data Sheet Asynchronous Serial Communications The MC9S12 Serial Communications Interface (SCI) Dallas Semiconductor DS1307 Real Time Clock The
More informationEmbedded Systems and Software. Serial Interconnect Buses I 2 C (SMB) and SPI
Embedded Systems and Software Serial Interconnect Buses I 2 C (SMB) and SPI I2C, SPI, etc. Slide 1 Provide low-cost i.e., low wire/pin count connection between IC devices There are many of serial bus standards
More informationPT7C4563 Real-time Clock Module (I2C Bus)
Features Description Using external 32.768kHz quartz crystal Supports I 2 C-Bus's high speed mode (400 khz) Includes time (Hour/Minute/Second) and calendar (Year/Month/Date/Day) counter functions (BCD
More informationParallel Data Transfer. Suppose you need to transfer data from one HCS12 to another. How can you do this?
Introduction the Serial Communications Huang Sections 9.2, 10.2, 11.2 SCI Block User Guide SPI Block User Guide IIC Block User Guide o Parallel vs Serial Communication o Synchronous and Asynchronous Serial
More informationDS1306. Serial Alarm Real Time Clock (RTC)
www.dalsemi.com FEATURES Real time clock counts seconds, minutes, hours, date of the month, month, day of the week, and year with leap year compensation valid up to 2100 96-byte nonvolatile RAM for data
More informationFunctional block diagram AD53x1 (Analog Devices)
Objectives - To read the A/D converter and turn the converted digital value back into an analogue voltage using an external D/A converter. The entire cycle including ADC and DAC is to be run at a fixed
More informationIntroduction the Serial Communications Parallel Communications Parallel Communications with Handshaking Serial Communications
Introduction the Serial Communications Parallel Communications Parallel Communications with Handshaking Serial Communications o Asynchronous Serial (SCI, RS-232) o Synchronous Serial (SPI, IIC) The MC9S12
More informationDS1676 Total Elapsed Time Recorder, Erasable
www.dalsemi.com Preliminary DS1676 Total Elapsed Time Recorder, Erasable FEATURES Records the total time that the Event Input has been active and the number of events that have occurred. Volatile Elapsed
More informationLecture 25 March 23, 2012 Introduction to Serial Communications
Lecture 25 March 23, 2012 Introduction to Serial Communications Parallel Communications Parallel Communications with Handshaking Serial Communications Asynchronous Serial (e.g., SCI, RS-232) Synchronous
More informationECE 4510/5530 Microcontroller Applications Week 6
ECE 4510/5530 Microcontroller Applications Week 6 Dr. Bradley J. Bazuin Associate Professor Department of Electrical and Computer Engineering College of Engineering and Applied Sciences Lab 5 Element Hardware
More informationRaystar Microelectronics Technology Inc.
Product Features Product Description Wide operating voltage 2.5V to 5.5V Self-contained battery and crystal in Module Supports I 2 C-Bus's high speed mode (400 khz) Includes time (Hour/Minute/Second) and
More informationMore on the 9S12 SPI Using the Dallas Semiconductor DS1302 Real Time Clock with the 9S12 SPI
More on the 9S12 SPI Using the Dallas Semiconductor DS1302 Real Time Clock with the 9S12 SPI Using the 9S12 SPI The SPI has a data register (SPIDR) and a shift register. To write data to the SPI, you write
More informationSerial Peripheral Interface. What is it? Basic SPI. Capabilities. Protocol. Pros and Cons. Uses
Serial Peripheral Interface What is it? Basic SPI Capabilities Protocol Serial Peripheral Interface http://upload.wikimedia.org/wikipedia/commons/thumb/e/ed/ SPI_single_slave.svg/350px-SPI_single_slave.svg.png
More informationEE 308 Spring Using the 9S12 SPI
Using the 9S12 SPI The SPI has a data register (SPIDR) and a shift register. To write data to the SPI, you write to the SPIDR data register. The 9S12 automatically transfers the data to the shift register
More informationInterfacing Techniques in Embedded Systems
Interfacing Techniques in Embedded Systems Hassan M. Bayram Training & Development Department training@uruktech.com www.uruktech.com Introduction Serial and Parallel Communication Serial Vs. Parallel Asynchronous
More informationDS1845 Dual NV Potentiometer and Memory
www.maxim-ic.com FEATURES Two linear taper potentiometers -010 one 10k, 100 position & one 10k, 256 position -050 one 10k, 100 position & one 50k, 256 postition -100 one 10k, 100 position & one 100k, 256
More informationDS1305. Serial Alarm Real Time Clock (RTC) FEATURES PIN ASSIGNMENT ORDERING INFORMATION
DS135 Serial Alarm Real Time Clock (RTC) FEATURES Real time clock counts seconds, minutes, hours, date of the month, month, day of the week, and year with leap year compensation valid up to 21 96 byte
More informationDS1305 Serial Alarm Real Time Clock (RTC)
Serial Alarm Real Time Clock (RTC) www.dalsemi.com FEATURES Real time clock counts seconds, minutes, hours, date of the month, month, day of the week, and year with leap year compensation valid up to 2100
More informationMcMaster University Embedded Systems. Computer Engineering 4DS4 Lecture 6 Serial Peripherals Amin Vali Feb. 2016
McMaster University Embedded Systems Computer Engineering 4DS4 Lecture 6 Serial Peripherals Amin Vali Feb. 2016 Serial Peripherals I2C Inter-IC Bus X/Y Coord. RGB data LCD config controller LCD data controller
More informationDisplay Real Time Clock (RTC) On LCD. Version 1.2. Aug Cytron Technologies Sdn. Bhd.
Display Real Time Clock (RTC) On LCD PR12 Version 1.2 Aug 2008 Cytron Technologies Sdn. Bhd. Information contained in this publication regarding device applications and the like is intended through suggestion
More informationTable 1. Basic functions of PT7C4363 Item Function PT7C4363. Source: Crystal: kHz Oscillator enable/disable - Oscillator fail detect
Real-time Clock Module (I 2 C Bus) Features Using external 32.768kHz quartz crystal Supports I 2 C-Bus's high speed mode (400 khz) Includes time (Hour/Minute/Second) and calendar (Year/Month/Date/Day)
More informationIntroduction to I2C & SPI. Chapter 22
Introduction to I2C & SPI Chapter 22 Issues with Asynch. Communication Protocols Asynchronous Communications Devices must agree ahead of time on a data rate The two devices must also have clocks that are
More informationHello, and welcome to this presentation of the STM32 I²C interface. It covers the main features of this communication interface, which is widely used
Hello, and welcome to this presentation of the STM32 I²C interface. It covers the main features of this communication interface, which is widely used to connect devices such as microcontrollers, sensors,
More informationMicrocontrollers and Interfacing
Microcontrollers and Interfacing Week 10 Serial communication with devices: Serial Peripheral Interconnect (SPI) and Inter-Integrated Circuit (I 2 C) protocols College of Information Science and Engineering
More informationRL78 Serial interfaces
RL78 Serial interfaces Renesas Electronics 00000-A Introduction Purpose This course provides an introduction to the RL78 serial interface architecture. In detail the different serial interfaces and their
More informationDS1625. Digital Thermometer and Thermostat FEATURES PIN ASSIGNMENT
DS1625 Digital Thermometer and Thermostat FEATURES Temperature measurements require no external components Measures temperatures from 55 C to +125 C in 0.5 C increments. Fahrenheit equivalent is 67 F to
More informationDS 1682 Total Elapsed Time Recorder with Alarm
DS 1682 Total Elapsed Time Recorder with Alarm www.dalsemi.com FEATURES Records the total time that the Event Input has been active and the number of events that have occurred. Volatile Elapsed Time Counter
More informationFM3135 Integrated RTC/Alarm/F-RAM & Embedded Crystal Features
Preliminary FM3135 Integrated RTC/Alarm/F-RAM & Embedded Crystal Features High Integration Device Replaces Multiple Parts Serial Nonvolatile Memory Real-time Clock (RTC) with Alarm Clock Output (Programmable
More informationGrowing Together Globally Serial Communication Design In Embedded System
Growing Together Globally Serial Communication Design In Embedded System Contents Serial communication introduction......... 01 The advantages of serial design......... 02 RS232 interface......... 04 RS422
More information1.3inch OLED User Manual
1.3inch OLED User Manual 1. Key Parameters Table 1: Key Parameters Driver Chip SH1106 Interface 3-wire SPI 4-wire SPI I2C Resolution 128*64 Display Size 1.3 inch Dimension 29mm*33mm Colors Yellow, Blue
More informationDS1305EN. Serial Alarm Real-Time Clock
Serial Alarm Real-Time Clock www.maxim-ic.com FEATURES Real-time clock (RTC) counts seconds, minutes, hours, date of the month, month, day of the week, and year with leap-year compensation valid up to
More informationDS1305EN. Serial Alarm Real-Time Clock
Serial Alarm Real-Time Clock www.maxim-ic.com FEATURES Real-time clock (RTC) counts seconds, minutes, hours, date of the month, month, day of the week, and year with leap-year compensation valid up to
More informationDS1302. Trickle Charge Timekeeping Chip FEATURES PIN ASSIGNMENT PIN DESCRIPTION
DS132 Trickle Charge Timekeeping Chip FEATURES Real time clock counts seconds, minutes, hours, date of the month, month, day of the week, and year with leap year compensation valid up to 21 31 x 8 RAM
More informationDS1682 Total-Elapsed-Time Recorder with Alarm
www.maxim-ic.com GENERAL DESCRIPTION The DS1682 is an integrated elapsed-time recorder containing a factory-calibrated, temperaturecompensated RC time base that eliminates the need for an external crystal.
More informationAdd a Non-Volatile Clock to the MC68HC705J1A. Some applications of using the DS1307 are:
Order this document by /D Add a Non-Volatile Clock to the MC68HC705J1A By Mark Glenewinkel Field Applications Engineering Consumer Systems Group Austin, Texas Introduction Many embedded systems require
More informationIntroduction the Serial Communications Huang Sections 9.2, 10.2 SCI Block User Guide SPI Block User Guide
Introduction the Serial Communications Huang Sections 9.2,.2 SCI Block User Guide SPI Block User Guide Parallel Data Transfer Suppose you need to transfer data from one HCS2 to another. How can you do
More informationDS WIRE INTERFACE 11 DECOUPLING CAP GND
Rev ; 4/3 Hex Nonvolatile Potentiometer with General Description The contains six 256-position nonvolatile (NV) potentiometers, 64 bytes of NV user EEPROM memory, and four programmable NV I/O pins. The
More informationPreliminary Data MOS IC. Type Ordering Code Package SDA Q67100-H5092 P-DIP-8-1
Nonvolatile Memory 1-Kbit E 2 PROM SDA 2516-5 Preliminary Data MOS IC Features Word-organized reprogrammable nonvolatile memory in n-channel floating-gate technology (E 2 PROM) 128 8-bit organization Supply
More informationBL24C02/BL24C04/BL24C08/BL24C16
BL24C02/BL24C04/BL24C08/BL24C16 2K bits (256 X 8) / 4K bits (512 X 8) / 8K bits (1024 X 8) / 16K bits (2048 X 8) Two-wire Serial EEPROM Features Two-wire Serial Interface VCC = 1.8V to 5.5V Bi-directional
More informationArduino Uno R3 INTRODUCTION
Arduino Uno R3 INTRODUCTION Arduino is used for building different types of electronic circuits easily using of both a physical programmable circuit board usually microcontroller and piece of code running
More informationFM24C02B/04B/08B/16B 2-Wire Serial EEPROM
FM24C02B/04B/08B/16B 2-Wire Serial EEPROM Sep. 2009 FM24C02B/04B/08B/16B 2-Wire Serial EEPROM Ver 1.7 1 INFORMATION IN THIS DOCUMENT IS INTENDED AS A REFERENCE TO ASSIST OUR CUSTOMERS IN THE SELECTION
More information64-Kbit/256-Kbit Integrated Processor Companion with F-RAM
64-Kbit/256-Kbit Integrated Processor Companion with F-RAM 64-Kbit/256-Kbit Integrated Processor Companion with F-RAM Features 64-Kbit/256-Kbit ferroelectric random access memory (F-RAM) Logically organized
More informationFM24C16B-GTR. 16Kb Serial 5V F-RAM Memory. Features. Pin Configuration. Description. Ordering Information NC NC NC VSS VDD WP SCL SDA.
Preliminary FM24C16B 16Kb Serial 5V F-RAM Memory Features 16K bit Ferroelectric Nonvolatile RAM Organized as 2,048 x 8 bits High Endurance (10 12 ) Read/Write Cycles 38 year Data Retention NoDelay Writes
More informationLecture 36 April 25, 2012 Review for Exam 3. Linking Assembly Subroutine with a C Program. A/D Converter
Lecture 36 April 25, 2012 Review for Exam 3 Linking Assembly Subroutine with a C Program A/D Converter Power-up A/D converter (ATD1CTL2) Write 0x05 to ATD1CTL4 to set at fastest conversion speed and 10-bit
More informationSILICON MICROSTRUCTURES
Digital Communication with SM5800 Series Parts OVERVIEW The SM5800 series pressure product offers the corrected pressure output in both analog and digital formats. Accessing the analog output is an easy
More informationPreliminary Data MOS IC. Type Ordering Code Package SDA Q67100-H5096 P-DIP-8-1
Nonvolatile Memory 4-Kbit E 2 PROM with I 2 C Bus Interface SDA 2546-5 Preliminary Data MOS IC Features Word-organized reprogrammable nonvolatile memory in n-channel floating-gate technology (E 2 PROM)
More informationFPGA Implementation Of SPI To I2C Bridge
FPGA Implementation Of SPI To I2C Bridge Abhilash S.Warrier Akshay S.Belvadi Dhiraj R.Gawhane Babu Ravi Teja K Abstract Today s electronic system is not a standalone unit instead working in a group, where
More informationRaspberry Pi - I/O Interfaces
ECE 1160/2160 Embedded Systems Design Raspberry Pi - I/O Interfaces Wei Gao ECE 1160/2160 Embedded Systems Design 1 I/O Interfaces Parallel I/O and Serial I/O Parallel I/O: multiple input/output simultaneously
More informationORDERING INFORMATION. OPERATION Measuring Temperature A block diagram of the DS1621 is shown in Figure 1. DESCRIPTION ORDERING PACKAGE
AVAILABLE Digital Thermometer and Thermostat FEATURES Temperature measurements require no external components Measures temperatures from -55 C to +125 C in 0.5 C increments. Fahrenheit equivalent is -67
More informationDS1306 Serial Alarm Real-Time Clock
Serial Alarm Real-Time Clock www.maxim-ic.com FEATURES Real-Time Clock (RTC) Counts Seconds, Minutes, Hours, Date of the Month, Month, Day of the Week, and Year with Leap-Year Compensation Valid Up to
More informationDS Wire Digital Thermometer and Real Time Clock
www.maxim-ic.com FEATURES Measures temperatures from -55 C to +125 C; Fahrenheit equivalent is -67 F to 257 F Real time clock counts seconds, minutes, hours, date of the month, month, day of the week,
More informationFeatures. Description PT7C4363B. Real-time Clock Module (I 2 C Bus)
Real-time Clock Module (I 2 C Bus) Features Drop-In Replacement for PT7C4363 Supports High-ESR Crystals Up To 100kΩ Using external 32.768kHz quartz crystal Supports I 2 C-Bus's high speed mode (400 khz)
More informationINTEGRATED CIRCUITS. PCA bit I 2 C and SMBus I/O port with interrupt. Product data sheet Supersedes data of 2004 Jul 27.
INTEGRATED CIRCUITS Supersedes data of 2004 Jul 27 2004 Sep 30 DESCRIPTION The is a 24-pin CMOS device that provide 16 bits of General Purpose parallel Input/Output (GPIO) expansion for I 2 C/SMBus applications
More informationGT24C02. 2-Wire. 2Kb Serial EEPROM (Smart Card application)
ADVANCED GT24C02 2-Wire 2Kb Serial EEPROM (Smart Card application) www.giantec-semi.com a0 1/19 Table of Content 1 FEATURES...3 2 DESCRIPTION...4 3 PIN CONFIGURATION...5 4 PIN DESCRIPTIONS...6 5 BLOCK
More informationM41T00S. Serial Access Real-Time Clock
Serial Access Real-Time Clock FEATURES SUMMARY 2.0 TO 5.5V CLOCK OPERATING VOLTAGE COUNTERS FOR SECONDS, MINUTES, HOURS, DAY, DATE, MONTH, YEAR, AND CENTURY SOFTWARE CLOCK CALIBRATION AUTOMATIC SWITCH-OVER
More informationDS1855 Dual Nonvolatile Digital Potentiometer and Secure Memory
Dual Nonvolatile Digital Potentiometer and Secure Memory FEATURES Two Linear Taper Potentiometers DS1855-010 (One 10kΩ, 100 Position and One 10kΩ, 256 Position) DS1855-020 (One 10kΩ, 100 Position and One
More informationTheory of Operation STOP CONDITION
AVR 300: Software I 2 C Master Interface Features Uses Interrupts Supports rmal And Fast Mode Supports Both 7-Bit and 10-Bit Addressing Supports the Entire AVR Microcontroller Family Introduction The need
More informationFM24C16C-GTR. 16Kb Serial 5V F-RAM Memory. Features. Description. Pin Configuration NC NC NC VSS VDD WP SCL SDA. Ordering Information.
Preliminary FM24C16C 16Kb Serial 5V F-RAM Memory Features 16K bit Ferroelectric Nonvolatile RAM Organized as 2,048 x 8 bits High Endurance (10 12 ) Read/Write Cycles 36 year Data Retention at +75 C NoDelay
More informationMicrocontrollers and Interfacing week 10 exercises
1 SERIAL PERIPHERAL INTERFACE (SPI) HARDWARE Microcontrollers and Interfacing week 10 exercises 1 Serial Peripheral Interface (SPI) hardware Complex devices (persistent memory and flash memory cards, D/A
More informationECE 4510 Introduction to Microprocessors. Chapter 10
ECE 451 Introduction to Microprocessors Chapter 1 Dr. Bradley J. Bazuin Associate Professor Department of Electrical and Computer Engineering College of Engineering and Applied Sciences Chapter 1 Serial
More informationFM3130-DGTR. Integrated RTC/Alarm and 64Kb F-RAM Features. Description. Pin Configuration. Ordering Information
FM3130 Integrated RTC/Alarm and 64Kb F-RAM Features High Integration Device Replaces Multiple Parts Serial Nonvolatile Memory Real-time Clock (RTC) with Alarm Clock Output (Programmable frequency) 64Kb
More informationFM3104/16/64/256 Integrated Processor Companion with Memory Features
Pre-Production FM3104/16/64/256 Integrated Processor Companion with Memory Features High Integration Device Replaces Multiple Parts Serial Nonvolatile Memory Real-time Clock (RTC) Low Voltage Reset Watchdog
More informationThe I2C BUS Interface
The I 2 C BUS Interface ARSLAB - Autonomous and Robotic Systems Laboratory Dipartimento di Matematica e Informatica - Università di Catania, Italy santoro@dmi.unict.it L.S.M. 1 Course What is I 2 C? I
More informationThe Cubesat Internal bus: The I2C
The Cubesat Internal bus: The I2C Description: The purpose of this document is to describe the internal bus on the Cubesat. The internal bus has been chosen to be the I2C bus Interconnected Integrated
More informationSerial Peripheral Interface (SPI)
SPI = Simple, 3 wire, full duplex, synchronous serial data transfer Interfaces to many devices, even many non-spi peripherals Can be a master or slave interface 4 interface pins: -MOSI master out slave
More informationFM24C02A 2-Wire Serial EEPROM
FM24C02A 2-Wire Serial EEPROM Apr. 2010 FM24C02A 2-wrie Serial EEPROM Ver 1.3 1 INFORMATION IN THIS DOCUMENT IS INTENDED AS A REFERENCE TO ASSIST OUR CUSTOMERS IN THE SELECTION OF SHANGHAI FUDAN MICROELECTRONICS
More informationDS14285/DS14287 Real-time Clock with NV RAM Control
Real-time Clock with NV RAM Control www.dalsemi.com FEATURES Direct replacement for IBM AT computer clock/calendar Functionally compatible with the DS1285/DS1287 Available as chip (DS14285, DS14285S, or
More information24C08/24C16. Two-Wire Serial EEPROM. Preliminary datasheet 8K (1024 X 8)/16K (2048 X 8) General Description. Pin Configuration
Two-Wire Serial EEPROM Preliminary datasheet 8K (1024 X 8)/16K (2048 X 8) Low-voltage Operation 1.8 (VCC = 1.8V to 5.5V) Operating Ambient Temperature: -40 C to +85 C Internally Organized 1024 X 8 (8K),
More informationFM24C Kb FRAM Serial Memory Features
Preliminary FM24C512 512Kb FRAM Serial Memory Features 512Kbit Ferroelectric Nonvolatile RAM Organized as 65,536 x 8 bits High Endurance 10 Billion (10 10 ) Read/Writes 45 year Data Retention NoDelay Writes
More informationQ-TECH CORPORATION. QT2024L CMOS, LOW CURRENT HIGH-TEMPERATURE REAL TIME CLOCK I 2 C SERIAL BUS INTERFACE 3.3Vdc. Description. Electrical Parameters
Description The QT2024 is an I 2 C-bus serial interface conforming, highprecision real-time clock (RTC) IC with a built-in 32.768kHz crystal oscillator circuit. In addition to clock and calendar functions,
More information1-Mbit (128K 8) Serial (SPI) nvsram with Real-Time Clock
1-Mbit (128K 8) Serial (SPI) nvsram with Real-Time Clock 1-Mbit (128K 8) Serial (SPI) nvsram with Real Time Clock Features 1-Mbit nonvolatile static random access memory (nvsram) Internally organized as
More informationSection 16. Basic Sychronous Serial Port (BSSP)
M 16 Section 16. Basic Sychronous Serial Port (BSSP) BSSP HIGHLIGHTS This section of the manual contains the following major topics: 16.1 Introduction...16-2 16.2 Control Registers...16-3 16.3 SPI Mode...16-6
More information64-Kbit/256-Kbit Integrated Processor Companion with F-RAM
64-Kbit/256-Kbit Integrated Processor Companion with F-RAM 64-Kbit/256-Kbit Integrated Processor Companion with F-RAM Features 64-Kbit/256-Kbit ferroelectric random access memory (F-RAM) Logically organized
More informationHow to Implement I 2 C Serial Communication Using Intel MCS-51 Microcontrollers
APPLICATION NOTE How to Implement I 2 C Serial Communication Using Intel MCS-51 Microcontrollers SABRINA D QUARLES APPLICATIONS ENGINEER April 1993 Order Number 272319-001 Information in this document
More informationNuvoton NCT5655Y/W. 16-bit I 2 C-bus and SMBus GPIO controller with interrupt. Revision: 1.0 Date: May, 2016 NCT5655Y/W
Nuvoton NCT5655Y/W 16-bit I 2 C-bus and SMBus GPIO controller with interrupt Revision: 1.0 Date: May, 2016 - I - Revision 1.0 NCT5655Y/W Datasheet Revision History PAGES DATES VERSION MAIN CONTENTS 1 18
More informationIf It s Electronic, It Needs a Clock
REAL-TIME CLOCKS MIXED-SIGNAL DESIGN GUIDE Data Sheets Application Notes Free Samples If It s Electronic, It Needs a Clock 8th EDITION No matter what you design, you need your system to accurately keep
More informationDesign and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso
Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso Microcontroller It is essentially a small computer on a chip Like any computer, it has memory,
More informationI 2 C Communication. Embedded Systems Interfacing. 25 October 2011
25 October 2011 frametitletypical System Specifications Version 1.0 1992 Up to 400 Kbps 10 bit addresses Version 2.0 1998 Up to 3.4 Mbps New signal levels for High-speed operation Version 2.1 2000 Some
More informationMCP795W1X/MCP795W2X. 3V SPI Real-Time Clock Calendar with Enhanced Features and Battery Switchover. Device Selection Table.
3V SPI Real-Time Clock Calendar with Enhanced Features and Battery Switchover Device Selection Table Part Number 32 khz Boot-up SRAM (Bytes) Timekeeping Features: EEPROM (Kbits) Unique ID MCP795W20 No
More informationor between microcontrollers)
: Communication Interfaces in Embedded Systems (e.g., to interface with sensors and actuators or between microcontrollers) Spring 2016 : Communication Interfaces in Embedded Systems Spring (e.g., 2016
More informationM68HC08 Microcontroller The MC68HC908GP32. General Description. MCU Block Diagram CPU08 1
M68HC08 Microcontroller The MC68HC908GP32 Babak Kia Adjunct Professor Boston University College of Engineering Email: bkia -at- bu.edu ENG SC757 - Advanced Microprocessor Design General Description The
More informationTemperature Sensor TMP2 PMOD Part 1
Temperature Sensor TMP2 PMOD Part 1 Overview of the Temperature Sensor and I 2 C Interfacing Reference Sites: Diligent Temp2 PMOD: http://www.digilentinc.com/products/detail.cfm?navpath=2,401,961&prod=pmod-tmp2
More informationProduct Family Specification
Doc.Nr. 8260800.06 Product Family Specification Absolute pressure sensor SCP1000-D01 SCP1000-D11 Note: Reader is advised to notice that this Product Family Specification applies to SCP1000 version which
More informationFM3104/16/64/256 Integrated Processor Companion with Memory Features
Pre-Production FM3104/16/64/256 Integrated Processor Companion with Memory Features High Integration Device Replaces Multiple Parts Serial Nonvolatile Memory Real-time Clock (RTC) Low Voltage Reset Watchdog
More informationDS1485/DS1488. RAMified Real Time Clock 8K x 8 FEATURES PIN ASSIGNMENT
DS1485/DS1488 RAMified Real Time Clock 8K x 8 FEATURES Upgraded IBM AT computer clock/calendar with 8K x 8 extended RAM Totally nonvolatile with over 10 years of operation in the absence of power Counts
More informationPARALLEL COMMUNICATIONS
Parallel Data Transfer Suppose you need to transfer data from one HCS12 to another. How can you do this? You could connect PORTA of the sending computer (set up as an output port) to PORTA of the receiving
More informationDS Wire Digital Thermometer and Thermostat
www.maxim-ic.com FEATURES Temperature measurements require no external components with ±1 C accuracy Measures temperatures from -55 C to +125 C; Fahrenheit equivalent is -67 F to +257 F Temperature resolution
More information64-Kbit (8 K 8) SPI nvsram with Real Time Clock
64-Kbit (8 K 8) SPI nvsram with Real Time Clock 64-Kbit (8 K 8) SPI nvsram with Real Time Clock Features 64-Kbit nonvolatile static random access memory (nvsram) Internally organized as 8 K 8 STORE to
More informationTotal-Elapsed-Time and Event Recorder with Alarm
General Description The DS1683 is an integrated elapsed-time recorder containing a factory-calibrated, low-temperature-coefficient RC time base that eliminates the need for an external crystal. Using EEPROM
More informationECE 4510/5530 Microcontroller Applications Week 9
ECE 45/553 Microcontroller Applications Week 9 Dr. Bradley J. Bazuin Associate Professor Department of Electrical and Computer Engineering College of Engineering and Applied Sciences Lab 7 & 8 Elements
More informationFremont Micro Devices, Inc.
FEATURES Low voltage and low power operations: FT24C02/04/08/16: V CC = 2.5V to 5.5V FT24C02A/04A/08A/16A: V CC = 1.8V to 5.5V Maximum Standby current < 1µA (typically 0.02µA and 0.06µA @ 1.8V and 5.5V
More informationEmulating I2C Bus Master by using FlexIO
Freescale Semiconductor, Inc. Document Number: AN5133 Application Notes Rev. 0, 06/2015 Emulating I2C Bus Master by using FlexIO 1. Introduction This application note lists the steps to use the FlexIO
More informationPart 1 Using Serial EEPROMs
Part 1 Using Serial EEPROMs copyright 1997, 1999 by Jan Axelson If you have a project that needs a modest amount of nonvolatile, read/write memory, serial EEPROM may be the answer. These tiny and inexpensive
More informationFM24CL04 4Kb FRAM Serial Memory
4Kb FRAM Serial Memory Features 4K bit Ferroelectric Nonvolatile RAM Organized as 512 x 8 bits Unlimited Read/Writes 45 Year Data Retention NoDelay Writes Advanced High-Reliability Ferroelectric Process
More information512K bitstwo-wire Serial EEPROM
General Description The provides 524,288 bits of serial electrically erasable and programmable read-only memory (EEPROM), organized as 65,536 words of 8 bits each. The device is optimized for use in many
More informationDistributed by: www.jameco.com 1-800-831-4242 The content and copyrights of the attached material are the property of its owner. DS12887 Real Time Clock www.dalsemi.com FEATURES Drop in replacement for
More informationACE24C512C Two-wire serial EEPROM
Description The ACE24C512C is a 512-Kbit I 2 C-compatible Serial EEPROM (Electrically Erasable Programmable Memory) device. It contains a memory array of 64 K 8 bits, which is organized in 128-byte per
More information