SX asm question using SPI mode on ISD1700 ChipCorder series

Thomas TaylorThomas Taylor Posts: 27
edited 2010-10-12 - 15:44:16 in Microcontrollers
Has anyone written asm code for Windbond’s ISD1700 ChipCorder series?
I am migrating from the ISD2500 series (because of the end-of-life of that series) and am learning how to code the ISD1700 SPI commands. I have successfully managed to single step several commands and can watch the SS, SCLK, MOSI, and MISO action on LEDs monitoring the SX’s registers.

But I also have some questions and problems to resolve in getting other commands to function properly and getting multiple commands to work together.

I built a programmer board for this chip and have successfully stored and played various sound messages using the push buttons in stand-alone mode. I have also used stand-alone mode under control of the SX28 (controlling the button inputs). But my real need is to become fluent with each command in SPI mode.

SPI mode offers seamless transitions between sound messages (using a buffer) which is the feature I require in my application. (I have played with two ISD1740s in stand-alone mode under control of the SX28 manipulating sounds in the Circular Memory Architecture. While one ISD1740 was playing, the SX program set up the other ISD1740. When the current sound completed, the other ISD1740 picked up seamlessly. It worked, but required two ISD1740 chips, lots of PCB real-estate, and just wasn’t very elegant.

I have poured through the (below) documentation numerous times, always picking up something I didn’t quite understand on a previous read.

http://www.techs-store.com/support/manual/isd1700/isd1700_eman.pdf

But after several weeks of trial and error, always making slow progress, I want to see if anyone else “has arrived” or is at least on the path to writing SX asm code to make this chip function in SPI mode.

I have searched the SX forum and the web in general with no hits on this subject.

I have attached my simple code that works for STEPPING a few commands INDIVIDUALLY. But for some reason, I have difficulty putting commands together (single-stepping to observe register results).

The PU command will return a MISO with SR0, bit 2 = 1 (power up).
The RD_STATUS command will return a MISO with SR1, bit0 = 1 (ready).
The DEVID command will return a MISO with Data Byte 2, bits <7:3> = 10110 (Device ID for an ISD1740).
The RD_APC command will return a MISO with Data Bytes 2 & 3 = (the default: D6 and D10 both = 1).
When I put them together the expected results fail. It seems that I will often see what looks like SR0 with the Power Up (bit 2 =1) instead of the DEVICE_ID or SR1 STATUS.

Thanking you for having read this far…and hoping you might be further up the trail. I would appreciate anyone’s thoughts or suggestions.

Thanks again.

Thomas Taylor

Comments

  • Thomas TaylorThomas Taylor Posts: 27
    edited 2008-02-11 - 03:20:19
    I found my problem as to why I could not execute one ISD1700 command after another. But it did take the effort to write and post my initial forum submission. An hour after posting, I was re-reading the documentation once again and WHAM! There it was! Almost like reading a quote from my posting!

    “It seems that I will often see what looks like SR0 with the Power Up (bit 2 =1) instead of the DEVICE_ID or SR1.”

    I was reading the information under the MISO Data Sequence chart (Table 10.2) and the last sentence read….”The 5th, 6th, and 7th bytes are the repeat of SR0 status.”

    Now THAT caught my attention. But I wondered, “ why?”

    The only thing I could figure out would be a case where one command “slopped” over into another…where MISO data was still being sent from the preceding command and I was seeing other bytes that “looked like” SR0. That thought led me to consider the SS line, the Slave Select signal.

    Then I noticed on the timing diagrams that SS did indeed go high after the SPI transaction. MY PROBLEM was a misunderstanding of this signal. I thought SS was low for the duration of all transactions, much like /CE (chip enable).

    I do have to say, however, that there is a case that kept me from understanding this long ago. The DEVID (Device ID) command can be sent multiple times, DURING one SS period, and still report the correct ID. (This one still confuses me. But I’ll save that for another day.)

    Bottom line: I can now step through all the commands I have worked with, one after another, and all MISO data reports correctly.

    I extend my apologies to those who may have labored through my post. However, as I said, I feel it was fundamental to catching my misunderstanding. I can now retire for the night and finally sleep - instead of counting bits and bytes!

    Thanks everyone!

    Thomas Taylor
  • smitherssmithers Posts: 2
    edited 2008-03-24 - 23:06:14
    Hello,

    I was wondering how you built your interface. Is it·your own design or did you get it somewhere else? Is there a schematic available. I'm trying my own little prodject and I want good quality sound.

    Thanks
  • DosManDanDosManDan Posts: 179
    edited 2008-03-25 - 01:27:28
    I built a library of SPI commands for the ISD chips last year when I was working with the ISD4004. This should have everything you need to make it work plus a little extra. I also interfaced with an EPROM chip to store the location of the sounds. You just need to add the new commands for your chip. Looks like it has a few different commands, but the rest appears to work the same.

    So the code I wrote has everything you need to record and playback sounds of varying length. Hope it helps.

    http://forums.parallax.com/showthread.php?p=659734

    Dan


    Post Edited (DosManDan) : 3/25/2008 1:35:15 AM GMT
  • smitherssmithers Posts: 2
    edited 2008-03-25 - 12:06:32
    Thanks!



    Ryan
  • JonnyMacJonnyMac Posts: 6,231
    edited 2008-03-25 - 19:12:23
    I, too, have been experimenting with the ISD1700 series. I've attached a WIP program that may help you get connected.

    [noparse][[/noparse]Edit] My program has been updated -- see below.

    Post Edited (JonnyMac) : 10/9/2008 8:43:39 PM GMT
    Jon McPhalen
    Hollywood, CA
    It's Jon or JonnyMac -- please do not call me Jonny.
  • Thomas TaylorThomas Taylor Posts: 27
    edited 2008-05-07 - 01:13:02
    smithers,

    I'm sorry for the delay in responding to your question...I have been "out" for a while and have not seen your request.

    Below are links that I found helpful. The second one is the actual 17 page document with photos and schematic for a programmer. I laid out my components for a PCB in a different manner than the photo shows. (There is no PCB artwork in this doc.) I wanted to get my bypass caps closer to the power pins than what I saw in the photo.

    http://www.marthel.pl/en/solutions.php

    http://www.marthel.pl/katalog/MART1700_eng_v2.pdf

    I used the programmer to learn and experiment with. However, it probably is not necessary to build one. All I do now is use the ISD-1740 on a bread board and activate the pins directly if I want to use push-button control. (The pins have built-in pull-up resisters.) But I mainly am programming the SX to send SPI commands.

    I have not been too happy with the volume level from the chip. (Note that the chip has an eight level stepping volume control.) I have not been able to get back to working on the audio level aspect and hope that I might be doing something wrong and the chip will perform better when I become better acquainted with it.

    I would like to hear from anyone who uses this chip and has had satisfactory experience with the audio volume.

    Tom
  • JonnyMacJonnyMac Posts: 6,231
    edited 2008-10-09 - 20:42:25
    After a long delay I am back working with the ISD17xxx series and finally having some luck. What's odd -- for my application, anyway -- is that you cannot write the Play Pointer directly. In my app I want to play one of N segments that are stored in the device without knowing the specific address of that segment. The solution is to advance the Play Pointer with the FWD command until you get home ($010) and then advance as required from there.

    I've attached my latest "lab" code; it seems to work as I intended.

    Post Edited (JonnyMac) : 10/9/2008 8:48:35 PM GMT
    Jon McPhalen
    Hollywood, CA
    It's Jon or JonnyMac -- please do not call me Jonny.
  • bukibuki Posts: 2
    edited 2009-02-05 - 04:30:33
    Hello,
    Am working on my senior project and am having a hard time figuring out how to control the ISD1740...i have evrything all wired up, i used the standalone mode to record the msg on it. i just need to be able to control it with bs2 to play the msg.......
  • JonnyMacJonnyMac Posts: 6,231
    edited 2009-02-05 - 16:40:12
    buki said...
    Hello,
    Am working on my senior project and am having a hard time figuring out how to control the ISD1740...i have evrything all wired up, i used the standalone mode to record the msg on it. i just need to be able to control it with bs2 to play the msg.......

    You can find BS2 code on this page: www.cowlacious.com/Support.htm
    Jon McPhalen
    Hollywood, CA
    It's Jon or JonnyMac -- please do not call me Jonny.
  • bukibuki Posts: 2
    edited 2009-02-06 - 00:33:47
    thanks
  • Thomas TaylorThomas Taylor Posts: 27
    edited 2009-02-13 - 22:58:25
    This is in response to a PM that came to me recently and I thought it would be better handled in the forum. Basically, the question was asked as to how to start to learn to program the ISD1700 series devices. Here are my thoughts based on my personal experience last year. (I have been away from the chip for a year, so this has been a good review for me as I now have to get back to this aspect of my project.)

    1. Download and read the ISD1700 Series Design Guide.
    http://www.vla.com.br/news/I1700 Design Guide Rev 1.1.pdf

    2. Read it again. (Seriously, have a copy by your computer, by your bed, and in the bathroom.)

    3. FOLLOW Section 11.6 (paragraph 1). This is as basic a plan as can be given. If you skip this you are on your own. This is not the easiest chip to learn.

    4. It will help tremendously to make extra copies of all the TABLES in section 10, section 11.6, and section 11 SPI COMMAND REFERENCE. These will be handy to have right next to as you will be thumbing through the rest of the manual all the time while still referring to these pages.

    5. *** MOST IMPORTANT *** The copy (that you did make!) of section 11.6 General Guidelines for Writing Program Code, contains 7 Rules. As you write code and debug, keep rereading these rules. (Highlight the key question in each rule so you can easily and quickly scan over them as you debug. As someone once said, “The answer is in there!” I think I probably solved most of my problems by asking myself these questions OVER…OVER…and OVER again. They are a checklist. USE THEM! (I’m slow, but eventually understanding even came to me. You will do well also.)

    6. PROGRAMMER: I did make a programmer that worked successfully, but felt that I did not really have to do so. I ended up just using my design board for both standalone mode and SPI mode.

    7. What I highly recommend: (I'm from the old school. I programmed assembly language (and machine language) back in the sixties (just after we got radio and heard about TV). I like to see the bits – every one of them! When they are there…and when they are not there. So, I set up two monitoring LED displays (8 LEDs each) – one for MISO and another for MOSI, using registers B and C of the SX28. These are used to monitor the serial transfer of the MOSI & MISO lines as the simultaneous shifting takes place (while you SINGLE STEP through the instruction). I also set up two other LEDs to monitor the status of /SS and SCLK. You will be comparing your results with the timing diagrams in section 11. **** PAY ATTENTION TO EVERY BIT in every byte! **** Know what they represent. Some are error indicators. Some let you know that everything went well or is normal.

    8. See step #3.

    I put all my manual in a three ring binder with section tabs. This made referencing very easy. All the extra copies of special pages I had right before me or posted on a board in EASY reading distance.

    As Section 11.6 says (did I remember to tell you about 11.6?) learn and understand each SPI command separately. After the basics (PU, PD, STOP, RESET, CLR_INT) I found that a good command to start with is the DEVID (Device ID) command. If you can not retrieve the Device ID, well, keep trying.

    This was my journey into the ISD 1700 series. Hope others will share their thoughts and that this has been a help to someone else.
  • cincailocincailo Posts: 2
    edited 2009-02-15 - 15:07:49
    Thank you so much. But it seem really hard to use this chip. Anyway, I will try my best and look at the datasheet again, again and again. But for step #6, we need to design our own board? At first I thought we can just apply the circuit given in datasheet section 15 typical application circuit except the programming part. Am I correct? As for the section 7 (in datasheet) analog path configuration, actually is it related to SPI? How to configure it? I just feel like it is something extra and don't know what is it.

    Post Edited (cincailo) : 2/16/2009 2:29:13 PM GMT
  • Thomas TaylorThomas Taylor Posts: 27
    edited 2009-02-18 - 02:58:49
    cincailo,

    If I understand your question correctly: No. You do not have to build a programmer. It was just easier for me to learn the standalone mode first, then the SPI mode with the assembly programming of the SX28. I also wanted to pay close attention to the power routing on my PCB for the separate analog and digital power pins and their respective bypass caps. Building the programmer gave me a chance to check out my design.

    As far as the analog paths: You can go with the default settings unless there is something in your design that dictates otherwise. Take note of the speaker output choices and the vol control bits (D0-D2) in the APC register (page 17 - 18). If the defaults are not what you want to use, you must change them by SPI command (WR_APC2 for example).

    Hope this helps some. It is a challenging chip. But we need to get better acquainted with sound for the SX.

    Regards,

    Thomas
  • cincailocincailo Posts: 2
    edited 2009-02-19 - 04:42:54
    Dear Thomas,

    Thank you so much. Get what you mean.

    I try to set up the circuit for standalone mode as in page 76 but it seems can't function at all. Actually we need to modify the circuit? Or it is my mistake and actually it can function? In the standalone operations notes, (section 8 page 19), it always mention about the LED blinking/ flashing, it is refer to the circuit in page 76 (standalone mode) or actually it is referring to the ISD programmer board? Just to confirm it.

    Last time when you did this standalone mode, you preferred sound effect mode (SE mode) or without it (direct recording, playback)? Because I feel the SE mode seem tedious. Anyway, something wrong somewhere, I have follow exactly the circuit in page 76 with a voltage regulator to supply it 5V. But nothing happen when I press any push button. Actually is the ISD chip easily spoil? How can I know whether it is spoil? Any idea to check it?


    Thank you. Hope you don't feel irritating that I keep asking the stupid question.


    From,

    cincailo


    Thomas Taylor said...
    cincailo,

    If I understand your question correctly: No. You do not have to build a programmer. It was just easier for me to learn the standalone mode first, then the SPI mode with the assembly programming of the SX28. I also wanted to pay close attention to the power routing on my PCB for the separate analog and digital power pins and their respective bypass caps. Building the programmer gave me a chance to check out my design.

    As far as the analog paths: You can go with the default settings unless there is something in your design that dictates otherwise. Take note of the speaker output choices and the vol control bits (D0-D2) in the APC register (page 17 - 18). If the defaults are not what you want to use, you must change them by SPI command (WR_APC2 for example).

    Hope this helps some. It is a challenging chip. But we need to get better acquainted with sound for the SX.

    Regards,

    Thomas
  • Thomas TaylorThomas Taylor Posts: 27
    edited 2009-02-19 - 21:08:50
    Hello cincailo,

    I have not found any problems with the schematics in the ISD1700 manual.

    You referenced page 19. Look at section 8.1.2. (Entering SE Mode). Now I have not used SE mode as I do not need the Sound Effects to indicate status of push buttons in Standalone Mode as my goal is using assembly language to program SPI for the SX28. However, this section may be a simple test to answer your next question as to whether or not the ISD chip is good or defective. By pulling /FWD (pin 26) LOW, the LED connected to /LED (pin2) flashes twice for me. (It may flash once for you - see the instructions in 8.1.2.) This should give you some idea as to the condition of your chip and/or your test setup.

    Also, when you perform the above test (pin 26 pulled LOW) an LED monitoring /INT/RDY (pin 27) lights when /FWD (pin 27) goes LOW. If you have not already checked the MART1700 documentation, see their schematic on page 3. Go to: www.marthel.pl/katalog/MART1700_eng_v2.pdf

    How are you recording your message (or sound)? Are you using a microphone or Anain? I did not spend much time using the microphone so I can not fairly address whether I was pleased or not with that mode of recording. I used the analog input Anain.

    Hope these thoughts help you along.

    Regards,

    Thomas
  • TinuzTinuz Posts: 2
    edited 2009-03-27 - 16:19:27
    Hello everyone,

    I hope someone can clear some things up for me on this forum, about the isd17xx.
    I read the design guide several times now but i dont understand the following:
    How can i obtain start AND end addresses of a sound.
    Because in SPI mode with set_play the start and end addresses have tobe provided.
    And the sounds can change so start/end addresses aren't at a fixed place.

    Is the start address of sound 2 the end address of sound 1?
    If so then i can use a FWD at bootup of my software to determine these addresses and store them in memory of a pic and use a set_play with these values.

    Otherwise: i dont know [noparse]:)[/noparse]

    Hope someone can clear this up for me!

    Regards,
    Tinuz
  • JonnyMacJonnyMac Posts: 6,231
    edited 2009-03-28 - 13:07:36
    For a product I'm developing I allow the user to pass a message # (0 to N); I then find the beginning of memory, count EOMs to find the message, then set the end address to the end of memory. I have the EOM enable set so that the next EOM will terminate the message.
    Jon McPhalen
    Hollywood, CA
    It's Jon or JonnyMac -- please do not call me Jonny.
  • TinuzTinuz Posts: 2
    edited 2009-03-30 - 08:46:54
    Thats the part what i dont understand correctly. How do i get the end address of a message?
    any suggestions?
  • JonnyMacJonnyMac Posts: 6,231
    edited 2009-03-30 - 20:17:30
    You'll rarely find things explained the way you want in technical documentation. What you I do is enable the EOM marker; this stops the message at an EOM and the address can be read back.
    Jon McPhalen
    Hollywood, CA
    It's Jon or JonnyMac -- please do not call me Jonny.
  • Adi P.Nugroho,STAdi P.Nugroho,ST Posts: 2
    edited 2009-06-06 - 00:56:59
    I already build ISD1760 with standalone mode,so far so good if i make with microphone device, but my priority is downloading our mp3 files via AnalIn (Analog Line In) on ISD17xx. How's that ??

    Please give me some information about that, with standalone mode only, because i can't make on SPI mode (more troubles in my schedule [noparse]:)[/noparse] )....

    I'm so curious about this way (AnalIn)... i never found about AnalIn circuit diagram completely in any sites...

    Thank's for your help.

    Adi
    Indonesia
  • Adi P.Nugroho,STAdi P.Nugroho,ST Posts: 2
    edited 2009-06-06 - 01:10:30
    add on question :

    My problem is, how to transfer or downloading mp3 files sound from PC Computer to ISD17xx (my chip is ISD1760) via AnalIn ??

    I already try to connect AnalOut PC Computer to AnalIn ISD1760 pin directly or i take with capasitor circuit when record (Winamp played), that's not work when i play ISD17xx... the loudspeaker not "sing a song" which we want to transfer already....

    So how to make it clearly ?


    Thank You.

    Adi
    Indonesia
  • Don PomplunDon Pomplun Posts: 116
    edited 2010-06-06 - 23:18:00
    Funny how I ran into my old Parallax forums while looking for insight into using the 17xxx chipcorder on SPI ! Has anybody gotten any answers from Nuvoton, who now owns the ISD chip?
    I have their manual v1.3 7/29/08, marked Preliminary. It seems quite lacking, not to mention needing a lot of editing & corrections. Anything newer?
    TIA
    Don
  • Don PomplunDon Pomplun Posts: 116
    edited 2010-06-06 - 23:20:09
    Oh yeah, if you need a standalone recorder, with both built-in mic & line inputs, checks Qkits model K188.
  • JonnyMacJonnyMac Posts: 6,231
    edited 2010-06-11 - 23:02:39
    I can tell you that we (EFX-TEK) abandoned the ISD1700 after receiving information from Nuvoton (after a lot of *persuasion* on my part) that there is a problem with the die when run at 5v (you need to drop it to 4.3v) and using 12kHz sampling. During the course of many conversations their engineer said to me, "Well... the guy who wrote the documentation never actually used the chip and we fired him." That's supposed to make me feel better? Then they suggested that we redesign our product around one of their other chips. I told them if we had to re-design, they were out; we did... they are.

    Our product (which will be released shortly), called the AP-16+, uses a Propeller chip to play WAV files from an SD card. That's not without its challenges (the WAV players in ObEx have a problem with noise -- I got help from Chip Gracey [noparse][[/noparse]creator of the Propeller] to fix this). So... with Nuvoton, I have to deal with an "engineer" who barely knows the chip and cannot point to any problems in my source code; with Parallax I can go right to the top to solve a problem that was somewhat serious.

    Sorry... rant off. Nuvoton cost EFX-TEK a lot of time and money and I'm not happy about that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon McPhalen
    Hollywood, CA
    Jon McPhalen
    Hollywood, CA
    It's Jon or JonnyMac -- please do not call me Jonny.
  • MAFONIMAFONI Posts: 4
    edited 2010-10-12 - 15:44:16
    JonnyMac wrote: »
    You'll rarely find things explained the way you want in technical documentation. What you I do is enable the EOM marker; this stops the message at an EOM and the address can be read back.

    Friends, help me please,
    I need to assemble a player, as simple as possible for an ISD1760 chip corder. The board only needs to have PUSH PLAY TO PULL BOTTON - FORWARD and ERASE, a 5V regulator and nothing more. The output will go to powered speakers to your computer.
    Please help me with the layout, because I have urgency to introduce this project.
    Already, many thanks.
    Mafoni
Sign In or Register to comment.