Basic Connection of PCF8583 |
The built-in word address register is incremented automatically after each written or read data byte. Address pin A0 is used for programming the hardware address, allowing the connection of two devices to the bus without additional hardware.
The built-in 32.768 kHz oscillator circuit and the first 8 bytes of the RAM are used for the clock, calendar, and counter functions. The next 8 bytes can be programmed as alarm registers or used as free RAM space. The remaining 240 bytes are free RAM locations.
Block diagram of PCF8583 |
Features:
- I2C-bus interface operating supply voltage: 2.5 V to 6 V
- Clock operating supply voltage 1.0 V to 6.0 V at 0 °C to +70 °C
- 240 × 8-bit low-voltage RAM
- Data retention voltage: 1.0 V to 6.0 V
- Operating current (at fSCL = 0 Hz): max 50 μA
- Clock function with four year calendar
- Universal timer with alarm and overflow indication
- 24 hour or 12 hour format
- 32.768 kHz or 50 Hz time base
- Serial input and output bus (I2C-bus)
- Automatic word address incrementing
- Programmable alarm, timer, and interrupt function
- Slave addresses: A1h or A3h for reading, A0h or A2h for writing
Circuit Diagram |
This clock circuit is same as DS1307 - Real Time Clock. The only different is here I used PCF8583 RTC clock ic and change firmware. Because registers of DS1307 and PCF8583 are different.
To save micro-controller pins there are four input keys which are all connected to a single analogue input pin. This pin also drives one of the seven segment display LEDs so it has to be switched between input (to read the analogue voltage) and output (to drive the led). Each key pulls the analogue input to a different voltage level which you can easily read using the ADC (RA0).
Set Time:
Mode : Pressing mode button cycles the display showing 3 different data.
Mode 1 : Time only
Mode 2 : Seconds only
Mode 3 : Stand-by
Set : To change the value, set button must be pressed.
Set 1 : Edit mode, show Minute
Set 2 : Edit mode, show Hour
Set 3 : Return to clock mode
Up and Down : After Pressing set button, you can change the values indicated on clock by using this buttons.
UP : Values ++
In clock mode it will also change the 12/24Hr format.
Down : Values --
In clock mode it will do nothing.
Quartz Frequency Adjustment:
By evaluating the average capacitance necessary for the application layout, a fixed capacitor can be used. The frequency is measured using the 1Hz signal available after power-on at the interrupt output (pin 7). The frequency tolerance depends on the quartz crystal tolerance, the capacitor tolerance and the device-to-device tolerance. Average deviations of 5 minutes per year are possible. See data sheet for more detail.Use mikroC for compile.
PIC16F88 Pin Connection |
Posted By :
Please Note: All contents provided on this blog are for non-commercial purposes only.
Post a Comment