/************************************************* *********** * Processer : MICroChip PIC12C508 * * Compiler : Hi-TECH PICC 8.00 PL2 * * Writer : Jason Kuo * * DescripTIon : It CAN read/write 93LC46 (64 x 16-bit organizaTIon) * ************************************************** ***********/ staTIc volaTIle unsigned char RTCC @ 0x01; Static volatile unsigned char TMR0 @ 0x01; Static volatile unsigned char PCL @ 0x02; Static volatile unsigned char STATUS @ 0x03; Static unsigned char FSR @ 0x04; Static volatile unsigned char OSCCAL @ 0x05; Static volatile unsigned char GPIO @ 0x06; Static unsigned char control OPTION @ 0x00; Static volatile unsigned char control TRIS @ 0x06; /* STATUS bits */ Static bit GPWUF @ (unsigned)&STATUS*8+7; Static bit PA0 @ (unsigned)&STATUS*8+5; Static bit TO @ @unsigned)&STATUS*8+4; Static bit PD @ (unsigned)&STATUS*8+3; Static bit ZERO @ (unsigned)&STATUS*8+2; Static bit DC @ (unsigned)&STATUS*8+1; Static bit CARRY @ (unsigned)&STATUS*8+0; /* OPTION bits */ #define GPWU (1 "7) #define GPPU (1 "6) #define T0CS (1 "5" #define T0SE (1 "4" #define PSA (1 "3" #define PS2 (1 "2" #define PS1 (1 "1" #define PS0 (1 "0" /* OSCCAL bits */ Static volatile bit CAL3 @ (unsigned)&OSCCAL*8+7; Static volatile bit CAL2 @ (unsigned)&OSCCAL*8+6; Static volatile bit CAL1 @ (unsigned)&OSCCAL*8+5; Static volatile bit CAL0 @ (unsigned)&OSCCAL*8+4; Static volatile bit GP5 @ (unsigned)&GPIO*8+5; Static volatile bit GP4 @ (unsigned)&GPIO*8+4; Static volatile bit GP3 ​​@ (unsigned)&GPIO*8+3; Static volatile bit GP2 @ (unsigned)&GPIO*8+2; Static volatile bit GP1 @ (unsigned)&GPIO*8+1; Static volatile bit GP0 @ (unsigned)&GPIO*8+0; #define CONFIG_ADDR 0xFFF /* code protection */ #define MCLREN 0xFFFF // memory clear enable #define MCLRDIS 0xFFEF // memory clear dISAble /*watchdog*/ #define WDTEN 0xFFFF // watchdog timer enable #define WDTDIS 0xFFFB // watchdog timer disable /* code protection */ #define PROTECT 0xFFF7 // protect the program code #define UNPROTECT 0xFFFF // do not protect the program code /*osc configurations*/ #define EXTRC 0xFFFF // external resistor/caPACitor #define INTRC 0xFFFE // internal #define XT 0xFFFD // crystal/resonator #define LP 0xFFFC // low power crystal/resonator /* 93LC46 I/O PIN define */ #define CS GP0 //Chip Select #define CLK GP1 //Serial Data CLOCk #define DI GP2 //Serial Data Input #define DO GP4 //Serial Data Output Void Delay(unsigned int counter); Void Pulse(void); Void StartBit(void); Void EWEN(void); Void EWDS(void); Extern void Write93LC46(unsigned char Offset_Addr, unsigned int tx_data); Extern unsigned int Read93LC46(unsigned char Offset_Addr); Void InitPIC(void); #define CLRWDT() asm(" clrwdt") #define SLEEP() asm("sleep") #define ___mkstr1(x) #x #define ___mkstr(x) ___mkstr1(x) #define __CONFIG(x) asm("tpsect config,class=CONFIG,delta=2"); Asm("tglobaltconfig_word"); Asm("config_word"); Asm("tdw â€___mkstr(x)) #define __IDLOC(w) asm("tpsect idloc,class=IDLOC,delta=2"); Asm("tglobaltidloc_word"); Asm("idloc_word"); Asm("tirpct__arg," ___mkstr(w)); Asm("tdw 0&__arg&h"); Asm("tendm") __CONFIG(MCLRDIS & WDTDIS & EXTRC & PROTECT); /*------------------------------------------------ ---- Function : Delay Input : unsigned int (counter) Output : None Description : Delay routine If counter=1 delay 35us , if counter=10 delay 134us, If counter=100 delay 1.12ms, These delay is base on internal 4MHz -------------------------------------------------- ----*/ Void Delay(unsigned int counter) { While(counter》0) counter--; } /*------------------------------------------------ ---- Function : Pulse Input : None Output : None Description : Send a pulse (10) to Serial Data Clock(CLK) -------------------------------------------------- ----*/ Void Pulse(void) { CLK = 1; Delay(25); CLK = 0; }
ZGAR PCC KIT
ZGAR electronic cigarette uses high-tech R&D, food grade disposable pod device and high-quality raw material. All package designs are Original IP. Our designer team is from Hong Kong. We have very high requirements for product quality, flavors taste and packaging design. The E-liquid is imported, materials are food grade, and assembly plant is medical-grade dust-free workshops.
From production to packaging, the whole system of tracking, efficient and orderly process, achieving daily efficient output. We pay attention to the details of each process control. The first class dust-free production workshop has passed the GMP food and drug production standard certification, ensuring quality and safety. We choose the products with a traceability system, which can not only effectively track and trace all kinds of data, but also ensure good product quality.
We offer best price, high quality Vape Device, E-Cigarette Vape Pen, Disposable Device Vape,Vape Pen Atomizer, Electronic cigarette to all over the world.
Much Better Vaping Experience!
E-Cigarette Vape Pen,Disposable Device Vape,PCC SET, Vape Pen Atomizer,Latest Disposable E-Cigarette OEM vape pen,OEM electronic cigarette ZGAR INTERNATIONAL(HK)CO., LIMITED , https://www.zgarette.com