The DS3231 is a high-precision clock chip with an integrated temperature-compensated crystal oscillator and a 32.768KHz crystal for long-term accuracy; includes a backup power input that maintains accurate timing after disconnecting mains The register can store information such as time and alarm settings; two programmable calendar alarms and a programmable square wave output are provided to support the I2C bus interface.
The features of the DS3231 are as follows:Basic timing function, providing information on seconds, minutes, hours, days of the week, days, months, and years, and providing leap year compensation valid until 2100 years
Two calendar alarm clock functions
Programmable square wave output
Digital temperature sensor output: ±3°C
Aging correction register function
Backup battery input function
Clock accuracy is ±2ppm (0°C~40°C), ±3.5ppm (-40°C~+85°C)
Low power consumption
Ds3231 test program, using digital tube display#include 《reg51.h》
#include "intrins.h"
#define uchar unsigned char
#define uint unsigned int
Sbit SDA=P3^6; //analog I2C data transfer bit SDA
Sbit SCL=P3^7; //analog I2C clock control bit SCL
Sbit INT=P3^2;
Sbit RESET=P3^3;
Sbit led0=P1^0;
Sbit led1=P1^1;
Sbit led2=P1^2;
Sbit led3=P1^3;
Sbit led4=P1^4;
Sbit led5=P1^5;
Sbit led6=P1^6;
Sbit led7=P1^7;
Bit ack; //answer flag
#define DS3231_WriteAddress 0xD0 //Device write address
#define DS3231_ReadAddress 0xD1 //Device Read Address
#define DS3231_SECOND 0x00 // sec
#define DS3231_MINUTE 0x01 //minutes
#define DS3231_HOUR 0x02 //hour
#define DS3231_WEEK 0x03 //Week
#define DS3231_DAY 0x04 //Day
#define DS3231_MONTH 0x05 //month
#define DS3231_YEAR 0x06 //Year
//Alarm 1
#define DS3231_SALARM1ECOND 0x07 // sec
#define DS3231_ALARM1MINUTE 0x08 //
#define DS3231_ALARM1HOUR 0x09 //hour
#define DS3231_ALARM1WEEK 0x0A //Weekly/Day
//Alarm 2
#define DS3231_ALARM2MINUTE 0x0b //minutes
#define DS3231_ALARM2HOUR 0x0c //hour
#define DS3231_ALARM2WEEK 0x0d //Weekly/Day
#define DS3231_CONTROL 0x0e //Control Register
#define DS3231_STATUS 0x0f //Status Register
#define BSY 2 //Busy
#define OSF 7 //Oscillator stop sign
#define DS3231_XTAL 0x10 // Crystal Aging Register
#define DS3231_TEMPERATUREH 0x11 //Temperature register high byte (8 bits)
#define DS3231_TEMPERATUREL 0x12 //The lower byte of the temperature register (high 2 bits)
Uchar code dis_code[11]={0xc0,0xf9,0xa4,0xb0, // 0,1,2,3
0x99, 0x92, 0x82, 0xf8, 0x80, 0x90, 0xff}; // 4,5,6,7,8,9,off
Uchar data dis_buf[8];
Uchar data dis_index;
Uchar data dis_digit;
Uchar BCD2HEX(uchar val) //BCD converted to Byte
{
Uchar temp;
Temp=val&0x0f;
Val》"=4;
Val&=0x0f;
Val*=10;
Temp+=val;
Return temp;
}
Uchar HEX2BCD (uchar val) / / B code converted to BCD code
{
Uchar i,j,k;
i=val/10;
j=val;
k=j+(i""4);
Return k;
}
Void delayus(uint us)
{
While (us--);
}
Void Start_I2C()
{
SDA=1; //Send the data signal of the start condition
Delayus(1);
SCL=1;
Delayus(5); //Start condition establishment time is greater than 4.7us, delay
SDA=0; //send start signal
Delayus(5); // Start condition lock time greater than 4μs
SCL=0; // clamp the I2C bus, ready to send or receive data
Delayus(2);
}
Void Stop_I2C()
{
SDA=0; //Send the data signal of the end condition
Delayus(1); //Send the clock signal of the end condition
SCL=1; //End condition establishment time is greater than 4us
Delayus(5);
SDA=1; //Send I2C bus end signal
Delayus(4);
}
Void SendByte(uchar c)
{
Uchar BitCnt;
For(BitCnt=0;BitCnt"8;BitCnt++) //The length of the data to be transmitted is 8 bits.
{
If((c""BitCnt)&0x80)
SDA=1; //Judge the send bit
Else
SDA=0;
Delayus(1);
SCL=1; //Set the clock line high to inform the controller to start receiving data bits.
Delayus(5); //guarantee that the clock high period is greater than 4μs
SCL=0;
}
Delayus(2);
SDA=1; //8 bits are released after the data line is sent, ready to receive the acknowledge bit
Delayus(2);
SCL=1;
Delayus(3);
If(SDA==1)
Ack=0;
Else
Ack=1; //determine whether an acknowledge signal is received
SCL=0;
Delayus(2);
}
Uchar RcvByte()
{
Uchar retc;
Uchar BitCnt;
Retc=0;
SDA=1; //Set the data line as input mode
For(BitCnt=0;BitCnt"8;BitCnt++)
{
Delayus(1);
SCL=0; //set the clock line low, ready to receive data bits
Delayus(5); //clock low period is greater than 4.7μs
SCL=1; //Set the clock line high to make the data on the data line valid.
Delayus(3);
Retc=retc"1;
If(SDA==1)
Retc=retc+1; //Read the data bits, the received data bits are placed in the retec
Delayus(2);
}
SCL=0;
Delayus(2);
Return(retc);
}
Void Ack_I2C(bit a)
{
If(a==0)
SDA=0; //An acknowledgment or non-acknowledgement signal is sent here
Else
SDA=1;
Delayus(3);
SCL=1;
Delayus(5); //clock low period is greater than 4μs
SCL=0; //Clear the clock line and clamp the I2C bus to continue receiving
Delayus(2);
}
Vape pod also call pod vape, nowadays including two kinds of products. One is disposable vape, the other one is pod system. The former is e juice and battery integrated together, disposal after smoking out of e-liquid; the later consists of mini pod and rechargeable vape battery/vape device. Mini pod is replacement pod, that is disposable, while battery can use more than one year.
The pod use ceramic coil, cotton coil or mech coil, deliver a more delicate and smooth taste. Moreover, the disposable pod has more flavors, fruit, tobacco, banana, cool mint, strawberry and so on, let you taste more incredible flavor with great Nic satisfaction. The pod vape is ideal for users who want to make the transition from smoking to vaping or for sophisticated vapers who want a portable device for use on the go.
Pod systems are mostly the mouth-to-lung vaping style. Vape pods nowadays adopt draw-activated mechanism which need no button to operate, take a puff on the device, activate the device immediately.
The advantages of pod vape e cigarette you should know:
Affordable: the pods are cheaper than Disposable Vapes
Portable and convenient: pod systems are small and easy to carry around.
Discreet: pod systems have minimal vapor production.
Leak-proof: pod systems come with pre-built and disposable cartridges with low chances of leaking.
Stronger nicotine throat hit compatible with high nicotine salt and they will give you the satisfying nicotine hit quickly.
2ml e juice capacity
Vape Pod Wholesale,Pod Vape,Vape Shop,E Cigarette Vape Pod,E Cig Wholesale
Shenzhen Axiswell Technology Co., Ltd , https://www.medhealthycare.com