Hallo zusammen,
leider schaffe ich es nicht einen ISD1760 zum Sprechen zu bringen.
Vielleicht kennt sich ja wer aus und könnte mal über den Code schauen.
Im Stand-Alone Modus klappt er wunderbar. Wenn der Code durchgelaufen
ist, blinkt die vAlert-Lampe und es wurde offensichtlich etwas
gespeichert. Wenn ich dann die Play-Taste drücke, höre ich nur rund 4
Sekunden ein leises Rauschen... nicht dass was er hätte aufnehmen
sollen.
Hier der Code - anbei das was ich mit dem Datenlogger aufgezeichnet
habe. Der Baustein scheint schon richtig zu antworten, aber irgendwie
scheint meine Befehlsfolge bzw. meine Befehle nicht richtig zu sein...
1 | ISD:
|
2 |
|
3 | Startadresse = 0x10;
|
4 | Endadresse = 0x42; //entspricht ca. 4 Sekunden Aufnahmedauer
|
5 |
|
6 | ISD_Initialize(); //*****************************************************
|
7 | // Set up operational conditions /w 50ms delay
|
8 |
|
9 | ISD_ClearInt(); //*******************************************************
|
10 | CheckReady1:
|
11 | ISD_Rd_Status();
|
12 | if (ISD_isReady == 0)
|
13 | goto CheckReady1; // Check RDY bit
|
14 |
|
15 | ISD_PowerUp(); //********************************************************
|
16 | Check_Error1:
|
17 | ISD_Rd_Status();
|
18 | if (ISD_CMD_Err)
|
19 | goto Check_Error1; // Check CMD_Err bit
|
20 |
|
21 | pause (100); //********** Waiting time for PowerUp (min. 50ms) **********
|
22 |
|
23 |
|
24 | ISD_GlobalErase(); //****************************************************
|
25 | CheckError2:
|
26 | ISD_Rd_Status();
|
27 | if (ISD_CMD_Err) goto CheckError2; // Check CMD_Err bit
|
28 | CheckReady2:
|
29 | ISD_Rd_Status();
|
30 | if (ISD_isReady == 0); // goto CheckReady2 //neu
|
31 |
|
32 | ISD_ClearInt(); //*******************************************************
|
33 | CheckReady3:
|
34 | ISD_Rd_Status();
|
35 | if (ISD_isReady == 0) goto CheckReady3; // Check RDY bit
|
36 |
|
37 | ISD_WriteAPC2();
|
38 | CheckReady4:
|
39 | ISD_Rd_Status();
|
40 | if (ISD_isReady == 0) goto CheckReady4;
|
41 |
|
42 | ISD_ClearInt(); //*******************************************************
|
43 | CheckReady5:
|
44 | ISD_Rd_Status();
|
45 | // if (ISD_isReady == 0) // Check RDY bit
|
46 | pause(10);
|
47 |
|
48 | ISD_Stop();
|
49 |
|
50 | ISD_SetRecord(); //******************************************************
|
51 | CheckError3:
|
52 | ISD_Rd_Status();
|
53 | if (ISD_CMD_Err) goto CheckError3; // Check CMD_Err bit
|
54 | CheckInt2: // Monitoring INT status of SetRecord
|
55 | ISD_Rd_Status();
|
56 | if (ISD_isReady == 0) goto CheckInt2; // Check INT bit
|
57 |
|
58 | pause(5000);
|
59 | ISD_Stop();
|
60 |
|
61 | ISD_ClearInt(); //*******************************************************
|
62 | CheckReady6:
|
63 | ISD_Rd_Status();
|
64 | if (ISD_isReady == 0) goto CheckReady6; // Check RDY bit
|
65 |
|
66 | ISD_SetPlay(); //********************************************************
|
67 | CheckError4:
|
68 | ISD_Rd_Status();
|
69 | if (ISD_CMD_Err) goto CheckError4; // Check CMD_Err bit
|
70 | CheckInt3: // Monitoring INT status of SetPlay
|
71 | ISD_Rd_Status();
|
72 | if (ISD_INT == 0) goto CheckInt3; // Check INT bit
|
73 |
|
74 | ISD_PowerDown(); //******************************************************
|
Vielen Dank für eure Hilfe!
Hier noch die zugehörigen Funktionen:
1 | void ISD_Initialize (void)
|
2 | {
|
3 | //char Data;
|
4 | SS = 1;
|
5 | SCK_ISD = 1;
|
6 | MOSI = 0;
|
7 |
|
8 | pause (100);
|
9 | }
|
10 | //_____________________________________
|
11 | void ISD_ClearInt (void)
|
12 | {
|
13 | SS = 0;
|
14 |
|
15 | SR0a = ISD_SPI (0x04);
|
16 | SR0b = ISD_SPI (0x00);
|
17 |
|
18 | SS = 1;
|
19 | }
|
20 | //_____________________________________
|
21 | void ISD_PowerUp (void)
|
22 | {
|
23 | SS = 0;
|
24 |
|
25 | SR0a = ISD_SPI (0x01);
|
26 | SR0b = ISD_SPI (0x00);
|
27 |
|
28 | SS = 1;
|
29 | }
|
30 | //_____________________________________
|
31 | void ISD_Rd_Status (void)
|
32 | {
|
33 | SS = 0;
|
34 |
|
35 | SR0a = ISD_SPI (0x05);
|
36 | SR0b = ISD_SPI (0x00);
|
37 | SR1 = ISD_SPI (0x00);
|
38 |
|
39 | SS = 1;
|
40 | }
|
41 | //_____________________________________
|
42 | void ISD_SetRecord (void)
|
43 | {
|
44 | SS = 0;
|
45 |
|
46 | SR0a = ISD_SPI (0x81);
|
47 | SR0b = ISD_SPI (0x00);
|
48 | Data = ISD_SPI (Startadresse.low8);
|
49 | Data = ISD_SPI (Startadresse.high8);
|
50 | Data = ISD_SPI (Endadresse.low8);
|
51 | Data = ISD_SPI (Endadresse.high8);
|
52 | Data = ISD_SPI (0x00);
|
53 |
|
54 | SS = 1;
|
55 | }
|
56 | //_____________________________________
|
57 | void ISD_SetPlay (void)
|
58 | {
|
59 | SS = 0;
|
60 |
|
61 | SR0a = ISD_SPI (0x80);
|
62 | SR0b = ISD_SPI (0x00);
|
63 | Data = ISD_SPI (Startadresse.low8);
|
64 | Data = ISD_SPI (Startadresse.high8);
|
65 | Data = ISD_SPI (Endadresse.low8);
|
66 | Data = ISD_SPI (Endadresse.high8);
|
67 | Data = ISD_SPI (0x00);
|
68 |
|
69 | SS = 1;
|
70 | }
|
71 | //_____________________________________
|
72 | void ISD_Stop (void)
|
73 | {
|
74 | SS = 0;
|
75 |
|
76 | SR0a = ISD_SPI (0x02);
|
77 | SR0b = ISD_SPI (0x00);
|
78 |
|
79 | SS = 1;
|
80 | }
|
81 | //_____________________________________
|
82 | void ISD_WriteAPC2(void)
|
83 | {
|
84 | SS = 0;
|
85 |
|
86 | SR0a = ISD_SPI (0x65);
|
87 | SR0b = ISD_SPI (0b.0100.0000);
|
88 | Data = ISD_SPI (0b.0000.0000); // alt: (0b.0000.0100) vAlert jetzt eingeschaltet
|
89 |
|
90 | SS = 0;
|
91 | }
|
92 | //_____________________________________
|
93 | void ISD_GlobalErase () // löscht pauschal ALLE Nachrichten
|
94 | {
|
95 | SS = 0;
|
96 |
|
97 | SR0a = ISD_SPI (0x43);
|
98 | SR0b = ISD_SPI (0x00);
|
99 |
|
100 | SS = 1;
|
101 | }
|
102 | //_____________________________________
|
103 | void ISD_Reset ()
|
104 | {
|
105 | SS = 0;
|
106 |
|
107 | SR0a = ISD_SPI (0x03);
|
108 | SR0b = ISD_SPI (0x00);
|
109 |
|
110 | SS = 1;
|
111 | }
|
112 | //_____________________________________
|
113 | void ISD_PowerDown ()
|
114 | {
|
115 | SS = 0;
|
116 |
|
117 | SR0a = ISD_SPI (0x07);
|
118 | SR0b = ISD_SPI (0x00);
|
119 |
|
120 | SS = 1;
|
121 | }
|
122 | //_____________________________________
|
123 | void ISD_SetErase ()
|
124 | {
|
125 | SS = 0;
|
126 |
|
127 | SR0a = ISD_SPI (0x82);
|
128 | SR0b = ISD_SPI (0x00);
|
129 | Data = ISD_SPI (Startadresse.low8);
|
130 | Data = ISD_SPI (Startadresse.high8);
|
131 | Data = ISD_SPI (Endadresse.low8);
|
132 | Data = ISD_SPI (Endadresse.high8);
|
133 | Data = ISD_SPI (0x00);
|
134 |
|
135 | SS = 1;
|
136 | }
|