Pages: [1]   Go Down
Author Topic: wtv020-20s schematic  (Read 462 times)
0 Members and 1 Guest are viewing this topic.
jordan
Offline Offline
Jr. Member
**
Karma: 0
Posts: 56
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello , I saw arduino wave module  on website www.elechouse .com
Then I read datasheet of this module, the datasheet contains schematic of this module.
I want buy the pieces of this module and connect them on breadboard.

but the problem in the code  of this module :
they declare RST = 3 but in the schematic the RESEST connect with D5
and declare CLK(pin 2) = 9;DAT(pin 3) = 8; but in the schematic connect DAT(pin 2)  with A4 and CLK(pin 3) with A5
and another question what is the benefit of connect D6 with pin4(BUSY)?


 


Code:
/*
This code is show how Arduino Wave Module works with Arduino.
Code is not optimized. Any improving work on it is encouraged.
 (C) Copyright 2011 elechouse.com
 */
 
int RST = 3;
int CLK = 9;
int DAT = 8;
   
   
void setup() {   
   
   
    pinMode(RST, OUTPUT);
    pinMode(CLK, OUTPUT);
    pinMode(DAT, OUTPUT);
   
   
    digitalWrite(RST, HIGH);
    digitalWrite(CLK, HIGH);
    digitalWrite(DAT, HIGH);
   
    digitalWrite(RST, LOW);
    delay(5);
    digitalWrite(RST, HIGH);
    delay(300);
}

void loop() {
 
  send(0x0000);//play file 0000
  delay(10000);//delay 10 seconds
 
  send(0x0001);//play file 0001
  delay(10000);//delay 10 seconds
 
  send(0x0002);//play file 0002
  delay(10000);//delay 10 seconds
 
  send(0xfff0);//set voice volumn to 0 (turn off)
  delay(3000);
 
  send(0xfff4);//set voice volumn to 4
  delay(3000);
 
  send(0xfff7);//set voice volumn to 7
  delay(3000);
 
  send(0xfffe);// pause
  delay(5000);
  send(0xfffe);//play
 
 
 
  while(1);
}

/****************************************************
The following function is used to send command to wave shield.
You don't have to change it.

Send the file name to play the audio.
If you need to play file 0005.AD4, write code: send(0x0005).
For more command code, please refer to the manual
*****************************************************/
void send(int data)
{
  digitalWrite(CLK, LOW);
  delay(2);
  for (int i=15; i>=0; i--)
  {
    delayMicroseconds(50);
    if((data>>i)&0x0001 >0)
      {
        digitalWrite(DAT, HIGH);
        //Serial.print(1);
      }
    else
       {
         digitalWrite(DAT, LOW);
        // Serial.print(0);
       }
    delayMicroseconds(50);
    digitalWrite(CLK, HIGH);
    delayMicroseconds(50);
   
    if(i>0)
    digitalWrite(DAT, LOW);
    else
    digitalWrite(DAT, HIGH);
    delayMicroseconds(50);
   
    if(i>0)
    digitalWrite(CLK, LOW);
    else
    digitalWrite(CLK, HIGH);
  }
 
  delay(20);
}
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 178
Posts: 8064
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I can't find WTV020-20S on that website.  Do you have a URL for it?
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

jordan
Offline Offline
Jr. Member
**
Karma: 0
Posts: 56
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the name of module is [ Arduino Wave Module V2 ]
http://www.elechouse.com/elechouse/index.php?main_page=product_info&cPath=168_170&products_id=2161&zenid=knps0v5d8a7rb4cvke7thalf76

and this is datasheet for the module :
https://www.dropbox.com/s/emjehbo2xigqd5n/Arduino%20Wave%20manual.pdf
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 178
Posts: 8064
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I agree that the pin definitions in the software do not match the pin connections shown in the schematic.

Good luck figuring out which is correct (if either of them is).
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Pages: [1]   Go Up
Jump to: