Pages: [1]   Go Down
Author Topic: I2C interface with SP03  (Read 1085 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Anyone had any luck getting the SP03 working on I2C? Looking at other code samples and the documentation, this is what I have to say custom text:

Wire.beginTransmission(0x62);  //Address
  Wire.send(0x00);                  // Command Register
  Wire.send(0x00);                  // NULL
  Wire.send(0x00);                  // Volume (Max)
  Wire.send(0x05);                  // Speed
  Wire.send(0x03);                  // Pitch
  Wire.send("This is a test");      // Text to say
  Wire.send(0x00);                  // NULL
  Wire.endTransmission();           // ***** Hangs here!!! *****
  Wire.beginTransmission(0x62);
  Wire.send(0x00);                  // Command Register
  Wire.send(0x40);                  // Command to say stored buffer text
  Wire.endTransmission();



And this is what I have to say a pre-stored phrase:
 
 Wire.beginTransmission(0x62);
  Wire.send(0x00);
  Wire.send(0x02);
  Wire.endTransmission();


I have found that this all hangs on endTransmission no matter what I do.
If anyone has any suggestion/comment/whatever, lets have it.
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 525
Posts: 26523
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What is SPO3?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Worcester, MA
Offline Offline
God Member
*****
Karma: 3
Posts: 623
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you sure the address is 0x62 not 0xC4 ?
Logged

I2C GPS Shield

Checkout my Open Source GPS Tracker on Kickstarter

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 202
Posts: 8712
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.robotstorehk.com/SP03Tech.pdf

Did you include the required I2C pull-up resistors in your circuit?
Logged

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

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 525
Posts: 26523
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Are these available in the US? Looks like a neat board.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@Crossroads: Yes, it is or was available in the US. I usually buy parts like this from http://www.acroname.com The SP03 is a very cool board and it does a good job. The sad thing is that it is apparently obsolete now... wonder what the new version is.http://www.robot-electronics.co.uk/cgi-bin/sh000001.pl?REFPAGE=http%3a%2f%2fwww%2erobot%2delectronics%2eco%2euk%2f&WD=sp03&PN=Obsolete_products%2ehtml%23a30#a30

@johnwasser: Yup. I am using 0x62 and have played with that extensively. The code I provide is the actual code I use.
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 202
Posts: 8712
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@johnwasser:  The code I provide is the actual code I use.

 I asked about the pull-up resistors.  That's hardware not code.
Logged

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

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@johnwasser Yup. I have pullups on the bus. I also tried it directly off the Arduino (Just for S&G) and also tried it chained off my MD25 (Which has pull ups also).  Part of my trouble shooting process, I tried different cables (Thinking I may have a short or a break) and also tried different devices (SRF08 CMPS09 both work perfectly).
Logged

Worcester, MA
Offline Offline
God Member
*****
Karma: 3
Posts: 623
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Run this buss scanner and see if it sees the module.  http://todbot.com/blog/2009/11/29/i2cscanner-pde-arduino-as-i2c-bus-scanner/
Logged

I2C GPS Shield

Checkout my Open Source GPS Tracker on Kickstarter

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@wayneft Cool tool. I will run it tonight and see what it comes up with.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@wayneft I dont know what the malfunction here is, but I just ran through a number of tests with two SRF08's a CMPS09, and an MD25 all connected together. They all performed their functions perfectly. The I2C scanner apparently does not work with an Uno32 for some reason. So, none of my devices showed up at all.

Anyway, I messed around with the SP03 some more, and found that I could not even get the version number from it. It is simply non-responsive on I2c at all! So... just gonna have to (cringe) do it on Serial...  smiley-cry
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 202
Posts: 8712
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The I2C scanner apparently does not work with an Uno32 for some reason. So, none of my devices showed up at all.

This is the first you've mentioned UNO32, the PIC-based "Arduino compatible" board.  Perhaps you should try the UNO32 community for support.  It seems likely that the PIC processor and associated software is not fully compatible with Arduino code.
Logged

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

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@johnwasser The purpose of this initial post was to see if anyone had experience with this component and could hopefully share some code to get it working. I have no intent to diagnose if/how/why the I2C scanner does not work because that is not within scope of this thread, and it is not even in scope of this board since it is most likely an issue Chipkit has to address and resolve.

End result is that apparently this component (SP03) is having an I2C issue. I dont think the issue is with the Uno32 since all my other boards work flawlessly. Hence, I am simply going to use Serial on this unless there is an unlikely solution from Chipkit.
Logged

Pages: [1]   Go Up
Jump to: