Vitat's homepage

General => MP3 => Topic started by: spumanti on 15 Feb 2005, 21:11



Title: how to test CD emulator?
Post by: spumanti on 15 Feb 2005, 21:11
Hi!  :o

I have now built the CD emulator, and programmed it. Everything seems to be fine.
Programmed the Yampp3/USB too with the pioneer Yampp software.   8)

I would like to test it before i hook it up in the car.

Can I test it in any way. With Yaap terminal or something?

Please help! :)


Title: Re: how to test CD emulator?
Post by: Vitat on 15 Feb 2005, 21:41
Recompile code with LOG option.
Connect emulator to COM port to PC and to HU.
You must see protocol code.


Title: Re: how to test CD emulator?
Post by: spumanti on 15 Feb 2005, 22:00
I might need some help with those things!

Quote
Recompile code with LOG option.
How to do that. Do you have a .bat file that you can post, or something?

Quote
Connect emulator to COM port to PC and to HU.
How?
With:  [PC-com port]----<IPbus pins>----[emulator]----<RS232>----[Yampp3]  ????
I am not sure which parts to connect to the PC from the emulator. Which pins on com port?
HU is not attached yet!

Quote
You must see protocol code.
I can see the code in Yaap terminal, right?


Thanks in advance! :)


Title: Re: how to test CD emulator?
Post by: Vitat on 16 Feb 2005, 00:58
I might need some help with those things!
How to do that. Do you have a .bat file that you can post, or something?
Install WinAVR.
In Constant.h file remove two slashes in line
//#define LOG
Copy gcc.bat and gcc2.bat files (in WinXP) to IP-Bus directory and run "gcc.bat all"
With:  [PC-com port]----<IPbus pins>----[emulator]----<RS232>----[Yampp3]  ????
I am not sure which parts to connect to the PC from the emulator. Which pins on com port?
HU is not attached yet!
1. Check voltage between ground and IP-Bus pins (BUSP+ and BUSM-). Voltage must be 2,5V.
2. Connect like this
[PC-com port]----<RS232>----[emulator]----<IPbus pins>----[HU]
Open terminal program and look.
I can see the code in Yaap terminal, right?
Yes.


Title: Re: how to test CD emulator?
Post by: spumanti on 16 Feb 2005, 18:01
Hi Vitat!

I have now recompiled the emulator software with the LOG option enabled, as you said! (compiled it by running gcc.bat and gcc2.bat). Downloaded it (the .hex file)onto the ATmega8.
The lockbits and fuses are set as you describe on your homepage.

I have not connected the emulator to the HU yet. But shouldn't I get something on the yaap terminal anyway when I test it??? :?:
I connected the emulator to the PC (via RS232 to the COM port, 115200 baud, 8 databits, no parity and 1 stopbit).

The voltage on BUSM is +2,64 V DC.
The voltage on BUSP is +1,14 V DC.    is that OK?

Supply voltage for the emulator is 5 V DC.

Here's a picture of the emulator board:

Am i doing something wrong?


Title: Re: how to test CD emulator?
Post by: Vitat on 16 Feb 2005, 18:33
9600 baud! Or set in uart.h 115200 baud.

1,14V - low, but maybe will work...


Title: Re: how to test CD emulator?
Post by: spumanti on 16 Feb 2005, 20:01
Yay!!!   :lol:

I set the baud rate to 9600 and got a response on the terminal:
Quote
START
CD 01 10
 CD Error
 CD Error
 CD Error
 ...
  :D  :D  :D

Just need to test it with HU! :)


Title: not working right. HELP!!!
Post by: spumanti on 17 Feb 2005, 21:04
Tested it with HU connected now.   :(  need some help    :idea:

Emulator software: IPbus_v4.4 -LOG enabled
Connection:  [HU]----<BUSP and BUSM>----[CD-emulator]----<RS232>----[PC-com port]

I get lots of data (numbers printed on screen on yaap terminal) from the CD-emulator. When i press different buttons i get lots of different data on the terminal. It seems to be working.

Emulator software: IPbus_v4.4 -LOG disabled
Yampp software: Yampp_pioneer_v2.2 -edited xtal value for VLSI chip.
Connection:  [HU]----<BUSP and BUSM>----[CD-emulator]----<RS232>----[Yampp3/USB with ATmega162 chip (in mega161 mode)]

It doesn't work when I connect the Yampp to the CD-emulator.
The harddisk keeps turning on and off, like the yampp gets bad signals or something. There's no sound from the yampp.

BUSP and BUSM change voltages between approx 0,85 V and 2,75 V in periods of about 2 seconds.  (dont have a scope to see signals with).
The cable i use for the BUSP and BUSM is a twisted pair cable, not shielded. It is approximately 35 cm long. Could the signal be distorded through the cable, or have i done something else wrong???

Is it needed to connect pin 3 on the IPbus connector on the back of the HU to GND, when I have connected pin 10 and 11 to GND???  :?:


Title: Re: how to test CD emulator?
Post by: Vitat on 17 Feb 2005, 22:28
Connect emulator to PC with LOGs off and to HU.
Turn HU on. Select MultiCD on HU.
What do you see from emulator?


Title: Re: how to test CD emulator?
Post by: Vitat on 17 Feb 2005, 22:45
Do you recompile the code for mega161?
Precompiled code for 8515!!!


Title: Re: how to test CD emulator?
Post by: spumanti on 17 Feb 2005, 22:51
Quote
Do you recompile the code for mega161?
Precompiled code for 8515!!!

Shit.. forgot to think about that...
i'll check it!

will try to hook it up like you said:
Quote
Connect emulator to PC with LOGs off and to HU.
Turn HU on. Select MultiCD on HU.
What do you see from emulator?

Will be back in an hour (approx 22:00 CET)


Title: Re: how to test CD emulator?
Post by: spumanti on 18 Feb 2005, 00:54
Vitat, Thanks for all your help so far. I appreciate it! :)

Checked and recompiled both the Pioneer Yampp software and the CD emulator software. They should be fine now!

First i tried with LOG enabled. Got a lot of numbers on screen. (for more, see attached file: log_enabled.txt)
Code:
<<HU 30 52 00 06 00 02 AD 
CD 11 10 06 00 20 11 30 AD
<<HU 30 52 00 06 00 02 00
BCD 11 10 06 00 20 11 30 00
<HU 00 53 C0
<<HU 70 52 00 06 00 02 02 00
<HU 30 52 00 06 00 02 AD
CD 11 10 06 00 20 11 30 AD
<<HU 30 52 00 06 00 02 00
BCD 11 10 06 00 20 11 30 00
<CD 00 10
<<HU 30 52 00 06 00 02 AD

With LOG disabled i got this code: (see attached file: log_disabled.txt)
Code:
S   -start
nB  -next tr
pB  -prev tr
NB  -next disk
PB  -prev disk
s   -stop

I figured out the prolem with the harddrive, just a small error.

The player still doesn't work. It doesn't react on any inputs from the HU.


Title: Re: how to test CD emulator?
Post by: Vitat on 18 Feb 2005, 01:08
Emulator works fine.

For recompiled yampp code for mega161 you should do this:
1. in file "makefile" after #MCU name set like this
#MCU = at90s8515
MCU = atmega161

2. in file "constant.h" uncomment line with (delete two slashes)
#define YAMPP3USB

Next!!! Check cluster size on your HDD! Precompiled code for 4K cluster. Maybe your cluster size is bigger like 8K or 16K.
3. Set needed cluster size in file "constant.h"

And don't forget that you need connect emulator with yampp like this:

RX   ---------  TX
GND ---------  GND
TX   ---------  RX


Title: Re: how to test CD emulator?
Post by: Vitat on 18 Feb 2005, 01:14
When you powerup Yampp player:
HDD must spinup,
player reading directory structure from HDD,
HDD must spindown.

After this, when player receive  via RS232 play command ("S") - HDD spinup and begin playing.

If player receive play command while reading directory structure, HDD not spindown and player will begin playing.


Title: Re: how to test CD emulator?
Post by: spumanti on 18 Feb 2005, 01:47
Yes. When i power up the player, the HDD spins up, initializes and spins down again (takes about 1-2 seconds).

in makefile, MCU is:
MCU = atmega161

in Constants.h it is:
#define YAMPP3USB

The clustersize seems to be set to 4k, But i am not sure.
In the original "yadl.h" file from the Yampp firmware v1.30 it is defined to:
#define YADL_CLUSTERSIZE          0x40000
I formatted the HDD with that firmware installed. The disk is formatted with YADL (Jesper and MIS's homemade HDD format).

Yes, the two RS232's are connected like you said:
Quote
RX   ---------  TX
GND ---------  GND
TX   ---------  RX

It is like the Yampp itself doesn't recieve the commands from the emulator... :-k

Thanks again Vitat...
I'm getting some sleep now. :doubt: Will have a look at it tomorrow! 


Title: Re: how to test CD emulator?
Post by: Vitat on 18 Feb 2005, 01:54
yampp_pioneer code - it's modified code for FAT32!!! Not YADL!
I am not finished to modify YADL code for work with emulator.

To check yampp, connect it to PC by COM port and send "S". ;-)


Title: Re: how to test CD emulator?
Post by: spumanti on 18 Feb 2005, 12:59
aahhh!!

That's why...

So i'll need to reformat the harddrive?
can I do that in the Yampp or do i have to connect it to at PC to format?

Will i be able to use YamppLink (USB connection to upload new music to the player) when it's not YADL formatted.


Title: Re: how to test CD emulator?
Post by: Vitat on 18 Feb 2005, 13:18
aahhh!!

That's why...

So i'll need to reformat the harddrive?
can I do that in the Yampp or do i have to connect it to at PC to format?
You need to connect HDD to PC and format it to FAT32.

Will i be able to use YamppLink (USB connection to upload new music to the player) when it's not YADL formatted.
No.


Title: Re: how to test CD emulator?
Post by: spumanti on 28 Feb 2005, 22:52
Hi Vitat!

I have now reformatted a harddrive to FAT32.
It works when I test the Yampp with a terminal program! :) :) :)

Do you have a complete list of RS232 commands to control the player with?

I'd like to test all the functions before I build it into the car!

I am thinking about modifying the original Yampp3 software with YADL disk-structure so I can control it with the HU, and still have USB functionality.
How far are you with porting the current Yampp3/USB (ver. 1.30) firmware to be compatible with the CD emulator???

I'd really like that.

Thanks for a grrreat project!   :lol:


Title: Re: how to test CD emulator?
Post by: spumanti on 28 Feb 2005, 23:20
Here is a screenshot of the terminal communication.
The red brackets are the start and end of one song (approx 4 minutes).

How to get songtitle printed on screen? Now I only get Artist and Album printed.


Title: Re: how to test CD emulator?
Post by: Vitat on 01 Mar 2005, 01:44
dScissor Sisters - it's a disk title for Pioneer HU, it's a directory name.
tScissor Sisters - it's a track title for Pioneer HU, it's a file name.

Tags not supported!