12.01:
1.V+和GND,V-,看GND是否偏置在V+/2=2.5V上面,V-是否为0V
2.控制信息WR(反),D0,D1,A1~A3,CLKa,CLKb必须为CMOS电平输入
3.设计最简单的高通二阶滤波器
mode =3
center freq A= 20,000 20kHZ
clock freq A = 3,000,000 3MHZ
Q for A = 1.307
4.在时序上发现一个小错误,在max262datasheet上可以看到wr(反)是先低,数据D0和D1也同时进来,然后wr(反)拉高,数据D0和D1必须保持适当时间,大约在170ns左右把程序修改完后写数据到max262里的程序如下:
sbit FLWR = IOC^7; //USE AS GFILTTER
sbit FLA3 = IOC^5;
sbit FLA2 = IOC^4;
sbit FLA1 = IOC^3;
sbit FLA0 = IOC^2;
sbit FLD1 = IOC^1;
sbit FLD0 = IOC^0;
sbit PD0 = IOD ^ 0;
void writefillter(void) //二阶滤波器设计N for ratio =31 N for Q = 79
{
// IOC = 0xFF;
#pragma asm
MOV IOC,#0FFH
MOV IOC,#11000011B //ADDRESS 0000H
//address start time
CLR FLWR
MOV A,IOC
ANL A,#00000010B //data 10 mode 3
MOV IOC,A
SETB FLWR
NOP
NOP
MOV IOC,#0FFH
MOV IOC,#0FFH
MOV IOC,#11000111B //ADDRESS 0001H
//address start time
CLR FLWR
MOV A,IOC
ANL A,#00000011B //data 11
MOV IOC,A
SETB FLWR
NOP
NOP
MOV IOC,#0FFH
MOV IOC,#11001011B //ADDRESS 0010H
//address start time
CLR FLWR
MOV A,IOC
ANL A,#00000011B //data 11
MOV IOC,A
SETB FLWR
NOP
NOP
MOV IOC,#0FFH
MOV IOC,#11001111B //ADDRESS 0011H
//address start time
CLR FLWR
MOV A,IOC
ANL A,#00000001B //data 01
MOV IOC,A
SETB FLWR
NOP
NOP
MOV IOC,#0FFH
MOV IOC,#11010011B //ADDRESS 0100H
//address start time
CLR FLWR
MOV A,IOC
ANL A,#00000011B //data 11
MOV IOC,A
SETB FLWR
NOP
NOP
MOV IOC,#0FFH
MOV IOC,#11010111B //ADDRESS 0101H
//address start time
CLR FLWR
MOV A,IOC
ANL A,#00000011B //data 11
MOV IOC,A
SETB FLWR
NOP
NOP
MOV IOC,#0FFH
MOV IOC,#11011011B //ADDRESS 0110H
//address start time
CLR FLWR
MOV A,IOC
ANL A,#00000000B //data 00
MOV IOC,A
SETB FLWR
NOP
NOP
MOV IOC,#0FFH
MOV IOC,#11011111B //ADDRESS 0111H
//address start time
CLR FLWR
MOV A,IOC
ANL A,#00000001B //data 01
MOV IOC,A
SETB FLWR
NOP
NOP
MOV IOC,#0FFH
#pragma endasm
}
5.上面的程序配置进去,还是未工作,需进一步的调试。
12.03版本
1.突然发现对时序的理解仍然有问题,地址总线的持续时间是贯穿在整个数据写操作中,它的延时时间最长
所以
MOV IOC,#0FFH
MOV IOC,#11000011B //ADDRESS 0000H
//address start time
CLR FLWR
MOV A,IOC
ANL A,#00111110B //data 10 mode 3
MOV IOC,A
SETB FLWR
NOP
NOP
MOV IOC,#0FFH
MOV IOC,#0FFH
为写一个对地址操作的进程
2.突然发现自己对MAX262的芯片理解出现了致命性的错误,前些时间由于过分相信那个小VB程序,所以fclk/fo肯定设置错误,现在把它改过来了
如下:
Fclk = 1.5MHz fo="30KHz"
MODE = 10 3(高通)
查表得
Fclk/fo = 50 F5~F0=000110
Q="1".36 Q6~Q0=1010001
程序也相应地改动了,配置进单片机仍然没有结果,明天继续调试
文章评论(0条评论)
登录后参与讨论