ISD4004 voice chip C51 driver source code
/ * spi isd4004.h * /
#include "reg51.h"
#include "intrins.h"
sbit _cs = p0 ^ 0;
sbit _sclk = p0 ^ 3;
sbit _mosi = p0 ^ 1;
sbit _miso = p0 ^ 2;
sbit _rac = p0 ^ 4;
sbit _int = p0 ^ 5;
void delay (unsigned int i) // Delay procedure
{
while (i--);
}
void stopmode () // stop
{
unsigned char m, i, j;
_cs = 1;
_sclk = 0;
_cs = 0;
m = 0x30;
for (i = 0; i <8; i ++)
{
m = _cror_ (m, 1);
j = m << 1;
_mosi = cy;
_sclk = 0;
_sclk = 1;
}
_cs = 1;
}
void powerdown () // Power off
{
unsigned char m, i, j;
_cs = 1;
_sclk = 0;
_cs = 0;
m = 0x10;
for (i = 0; i <8; i ++)
{
m = _cror_ (m, 1);
j = m << 1;
_mosi = cy;
_sclk = 0;
_sclk = 1;
}
_cs = 1;
}
void powerup () power on
{
unsigned char m, i, j;
_cs = 1;
_sclk = 0;
_cs = 0;
m = 0x20;
for (i = 0; i <8; i ++)
{
m = _cror_ (m, 1);
j = m << 1;
_mosi = cy;
_sclk = 0;
_sclk = 1;
}
_cs = 1;
}
void record4004 (unsigned int address) recording address--recording address 0 --- 2400
{
unsigned char i, m, j;
unsigned int datasoute = 0;
powerup ();
delay (5118); // Power on delay
powerup ();
delay (5118); // Power on delay
delay (5118); // Power on delay
_cs = 1;
_sclk = 0;
m = 0xa0;
_cs = 0;
for (i = 0; i <16; i ++)
{
address = _iror_ (address, 1);
datasoute = address << 1;
_mosi = cy;
_sclk = 0;
_sclk = 1;
}
for (i = 0; i <8; i ++)
{
m = _cror_ (m, 1);
j = m << 1;
_mosi = cy;
_sclk = 0;
_sclk = 1;
}
_cs = 1;
_sclk = 0;
m = 0xb0;
_cs = 0;
for (i = 0; i <8; i ++)
{
m = _cror_ (m, 1);
j = m << 1;
_mosi = cy;
_sclk = 0;
_sclk = 1;
}
_cs = 1;
p0 = 0xff;
datasoute = 0;
while (_int == 1) // Store address newline flag
{
if (_rac) {delay (20000); datasoute ++;} // Record the number of lines occupied by this recording (that is, how big this recording is)
//
// You should add your own program here, that is, the recording exit program
//
}
} // while end;
void audioout (unsigned int address) // Playback program
{
unsigned char i, m, j;
unsigned int datasoute;
powerup ();
_cs = 1;
_sclk = 0;
_cs = 0;
m = 0xe0;
for (i = 0; i <16; i ++)
{
address = _iror_ (address, 1);
datasoute = address << 1;
_sclk = 0;
_mosi = cy;
_sclk = 1;
}
for (i = 0; i <8; i ++)
{
m = _cror_ (m, 1);
j = m << 1;
_sclk = 0;
_mosi = cy;
_sclk = 1;
}
_cs = 1;
_sclk = 0;
m = 0xf0;
_cs = 0;
for (i = 0; i <8; i ++)
{
m = _cror_ (m, 1);
j = m << 1;
_sclk = 0;
_mosi = cy;
_sclk = 1;
}
_cs = 1;
p0 = 0xff;
while (_int == 1)
{
} // while end;
}
main ()
{
record4004 (0);
audioout (0);
while (1);
}
Aurora Disposable Vape Device Vaping Pod Systems
Shenzhen WeiKa Technology Co.,Ltd. is a professional e-cigarette manufacturer and enterprise integrating R&D, design, production and sales and service of the electronic cigarette atomizer products, established in 2020.
We are actively developing and producing all kinds of reliable and unique atomizer products. We centre on research, developing, high quality and safety, and focus on better vaping experience in all aspects to our customers. We have advanced production equipment and strict production control system, each process has strict management, from production to delivery have been strictly tested to ensure the classic quality. Zgarvape for the future!
Aurora E-cigarette Cartridge is loved by the majority of consumers for its gorgeous and changeable colors, especially at night or in the dark. Fruits Flavors series, plant flavors series & special flavors series.Up to 16 different flavors for choices. A new design of gradient our disposable vape is impressive. Our vape pen and pods are matched with all the brands on the market. You can use other brand's vape pen with our vape pods. Aurora series Pods systems, the first choice for professional users!
16 Available Flavors (3Pods*2ml):
Amazing Cantaloupe / Coke on the Rocks / Ice Coconut / Ice Lolly / Iced Mung Bean / Longjing Tea / Mango Feast / Mountain Spring / Peach Tempting / Pineapple Juice / Refreshing Melon / Refreshing Mint / Rich Strawberry / Rose Litchi / The Ocean / Watermelon Juice
Aurora Pods 1.0,ZGAR Aurora Vape Pods 1.0 Pod System Vape,ZGAR Aurora Vape Pods 1.0 Pos Systems Touch Screen,ZGAR Aurora Pods 1.0 Disposable Vape Pod System,400Puffs Pod Vape System
Zgar International (M) SDN BHD , https://www.szvape-pods.com