Example of a C or assembly program for DSA interface ?

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hi,
I've at least understand how creating from scratch the controller for my CD Player.

As expected, the PIC18F452 will be used.

I've almost completed the LCD and buttons managing programs, but I do not understand how deal with the DSA interface at all ! :( :confused:

Does anyone can give me a hand ? A part of a source code will be very helpfull..

Regards
 
Retired diyAudio Moderator
Joined 2002
First, clearly understand the first 3 phases of the DSA data communication, detailed here:
http://www.daisy-laser.com/products/CD/modules/CDPro2/P10501_dsa.pdf
starting on page 6.

Next, if you look at my code (see attached text file), for the send data, it will match what is in the datasheet:
1) Set the tri-state buffers appropiately for sending
2) Run the sync phase (on top of page 7)
3) Send Command, Send Data (on bottom of page 7)
4) Set the tri-state buffers for receiving ack
5) Receive Acknowledgemnet (on top of page 8)

You must follow this procedure exactly for each GetData of SendData sequence. If you skip any parts of this, it simply will not work. If you look over the code, you will see that for every sequence, this is followed.

Let me know if you have any questions. This should get your started. It took me quite a while to understand this and get it working. The first half of this process was locating the correct data to start with, which I detailed above.

Good luck with your project! You can see pictures from my cdpro2 project here:
http://www.briangt.com/gallery/cdpro2
along with schematics which may be helpful.

--
Brian
 

Attachments

  • dsa.txt
    5.2 KB · Views: 147
Thanks a lot BrianGT :D :D :)

I will carefully look into your text file as soon as I'll get back home .

I will probably have questions:cheerful:

I've already visited your website. It helps me in choosing which PIC to use for the controller, altough the PIC16Fxx series will be sufficient :)

Indeed, I was wondering why you used the AD converter of the PIC for the button, unless you wanted to have more than 8 buttons.

As far as I'm concerned, the controller will only manage 5 buttons (STOP, PAUSE, PLAY, SKIP FWD, SKIP BCK). I would probably not use the AD converter. :cannotbe: :whazzat:
 
Retired diyAudio Moderator
Joined 2002
ZERS said:
Thanks a lot BrianGT :D :D :)

I will carefully look into your text file as soon as I'll get back home .

I will probably have questions:cheerful:

I've already visited your website. It helps me in choosing which PIC to use for the controller, altough the PIC16Fxx series will be sufficient :)

Indeed, I was wondering why you used the AD converter of the PIC for the button, unless you wanted to have more than 8 buttons.

As far as I'm concerned, the controller will only manage 5 buttons (STOP, PAUSE, PLAY, SKIP FWD, SKIP BCK). I would probably not use the AD converter. :cannotbe: :whazzat:

I used the ADC input to simplify wiring, and make it easily expandable. I have 2 different button boards, and they both with with the same input pin (same firmware as well) (one with 5 buttons, one with 8 buttons). It would easily work with 16 buttons. It has a 10-bit ADC, and if 1% resistors are used, you can easily get 32 button inputs off the single ADC input pin.

--
Brian
 
BrianGT said:


I used the ADC input to simplify wiring, and make it easily expandable. I have 2 different button boards, and they both with with the same input pin (same firmware as well) (one with 5 buttons, one with 8 buttons). It would easily work with 16 buttons. It has a 10-bit ADC, and if 1% resistors are used, you can easily get 32 button inputs off the single ADC input pin.

--
Brian

Please don't make fun of me, but for a french it is quite difficult to understand what ADC is all about. The PIC's datasheet is made of 300 pages of technical english :cannotbe:

So I have to read it chapter by chapter in order I hope to understand it.

I use to read english newpapers, but not technical magazines :boggled:

But I'm not hurry at all. Things will turn out all right... :clown:
 
Retired diyAudio Moderator
Joined 2002
ZERS said:


Please don't make fun of me, but for a french it is quite difficult to understand what ADC is all about. The PIC's datasheet is made of 300 pages of technical english :cannotbe:

So I have to read it chapter by chapter in order I hope to understand it.

I use to read english newpapers, but not technical magazines :boggled:

But I'm not hurry at all. Things will turn out all right... :clown:

Sorry for the confusion. ADC = Analog-Digital Converter. I thought you would understand, since you wrote AD converter in your post.

--
Brian
 
BrianGT said:


Sorry for the confusion. ADC = Analog-Digital Converter. I thought you would understand, since you wrote AD converter in your post.

--
Brian

Hello Brian,
I did understand what you explained me previously. I know what ADC means. ;)

Sorry if I wasn't clear --- I need to improve my english :smash:, ---but
I only wanted to point out that because of all the "technical" terms, I still haven't understand how deal with ADC so far.

I bought yesterday a french book regarding PICs (the 16F84 series) and I hope ADC will be more clearer to me afterwards. The aim is to understand which port to use, and how to program the PIC when using ADC. I belevied interrupts are not available with ADC ? :confused:

Should I feel confident, I would try to wire the buttons the way you did :nod:
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.