Vitat's homepage

General => MP3 => Topic started by: JaxonD24 on 11 Jun 2006, 05:17



Title: IP-BUS to Computer
Post by: JaxonD24 on 11 Jun 2006, 05:17
Hi,

This is my first post on this forum, and I would like to say that after a few hours reading through some posts, I am very impressed with all the work that has been done concerning the IP-BUS and Pioneer head unit!

I have a Pioneer head unit and the IP-BUS cable. I was looking for a way to control the computer through the head unit and found this forum. The problem is I have no knowledge of electronics and I also don't want to add more hardware to the setup I have, so building a hardware emulator and the YAMMP3 is not really an option. From what I have read, the hardware emulator interprets the data from the head unit and converts it to a standard RS232 format. Can the IP-BUS cable be connected directly to a serial port on a computer where software interpets and converts the data into commands which can control a software MP3 player?

If this is possible, it would be very good.

Thanks for any help.

Damian.


Title: Re: IP-BUS to Computer
Post by: vS on 21 Jun 2006, 17:12
The IP-BUS cable can't be directly connect to RS232 PC port, it only can connect acros "converter" that been convert RS232 command in/to IP-BUS
Converter-emulator can be build based on schema of present on this forum EMULATOR, with added RS232 level converter (MAX232) end correction of soft in microcontroller.


Title: Re: IP-BUS to Computer
Post by: GnatGoSplat on 02 Oct 2006, 19:08
Hi, I also want to connect IP-Bus to computer.
Is the only thing necessary, is to connect CAN-BUS IC to MAX232, then connect MAX232 to serial port?
If yes, then what settings are necessary (baud rate, bits, parity)?

Is it possible to connect a converter to the IP-Bus when there is already another device on it?
My goal is to use the converter to "listen" to the IP-Bus and log all communication on it.  I want to decode the XM Radio mode.

Also, before I start, has the XM Radio mode already been decoded?


Title: Re: IP-BUS to Computer
Post by: Vitat on 06 Oct 2006, 03:22
Hi, I also want to connect IP-Bus to computer.
Is the only thing necessary, is to connect CAN-BUS IC to MAX232, then connect MAX232 to serial port?
If yes, then what settings are necessary (baud rate, bits, parity)?
No. Protocols and levels are very different.

Is it possible to connect a converter to the IP-Bus when there is already another device on it?
My goal is to use the converter to "listen" to the IP-Bus and log all communication on it.  I want to decode the XM Radio mode.
You can connect converter between HeadUnit and another device directly to IP-Bus and connect converter out from MAX232 to serial port. Upload logging firmware and listen communication.


Title: Re: IP-BUS to Computer
Post by: GnatGoSplat on 06 Oct 2006, 18:17
I am a little confused.  How come the Atmega8 UART can be programmed to talk to the CAN-BUS IC, but an RS232 port cannot, not even through MAX232?  I thought RS232 uses a UART too?

Is any extra circuitry required to connect converter between head unit and another device?  Or can it just be connected in parallel like a Y-splitter?

Is a logging firmware already available, or would I need to modify your Yammp3 firmware to turn it into a logging firmware?  I did a search and found no references to logging firmware.  Unfortunately, I am unfamiliar with the C language.


Title: Re: IP-BUS to Computer
Post by: Vitat on 06 Oct 2006, 20:08
ATMega UART can't be programmed to talk with CAN-BUS IC! ATMega UART only for RS232 to PC or other UART device like MP3 player.
Look to the shematic diagramm from main site hardly!
Connect converter to IP-Bus parallel like spliter. If converter not be transmit any data - your HU and another device be working fine.
logging firmware (http://vitat.spb.ru/files/ip-bus/ipbus_logger.zip).


Title: Re: IP-BUS to Computer
Post by: GnatGoSplat on 06 Oct 2006, 20:27
Ok, I think I understand.  I looked at schematic and see RX and TX connected to INT0 and ICP.
I was trying to learn by reading C source, but I don't know C so I misunderstood it for using the UART.
Thanks for the logging firmware!

Is Atmega64 compatible with Atmega8 firmware?


Title: Re: IP-BUS to Computer
Post by: Vitat on 06 Oct 2006, 20:58
Is Atmega64 compatible with Atmega8 firmware?
No.


Title: Re: IP-BUS to Computer
Post by: GnatGoSplat on 05 Dec 2006, 17:33
Does the attached schematic look correct if I want to convert between IP Bus and 5V Serial?
I will use an external circuit to convert 5V serial to RS-232 so that part isn't in the schematic.


Title: Re: IP-BUS to Computer
Post by: Vitat on 06 Dec 2006, 02:33
Does the attached schematic look correct if I want to convert between IP Bus and 5V Serial?
I will use an external circuit to convert 5V serial to RS-232 so that part isn't in the schematic.
Swap the RX(4) and TX(14) pins at Mega8.
Swap the 2 and 3 input pins at lm393.
Remove R10, it's not needed.


Title: Re: IP-BUS to Computer
Post by: GnatGoSplat on 06 Dec 2006, 22:34
Thanks Vitat, I have fixed it, I think!


Title: Re: IP-BUS to Computer
Post by: Vitat on 07 Dec 2006, 02:57
Once more.
Put a p-n-p transistor and swap collector and emitter pins.


Title: Re: IP-BUS to Computer
Post by: GnatGoSplat on 23 Dec 2006, 02:15
Thanks Vitat, I have fixed the schematic and built the circuit.
Will your firmware do anything if Yampp3 is not connected?
I tried connecting to my stereo's IP-bus, but M-CD is not available.  I am just trying to test it right now.
Also, what are the correct settings for the Fuse bits?


Title: Re: IP-BUS to Computer
Post by: Vitat on 27 Dec 2006, 00:18
Thanks Vitat, I have fixed the schematic and built the circuit.
Will your firmware do anything if Yampp3 is not connected?
I tried connecting to my stereo's IP-bus, but M-CD is not available.  I am just trying to test it right now.
Also, what are the correct settings for the Fuse bits?

M-CD must be available without connecting yampp3.
Fuse bits for Mega8?


Title: Re: IP-BUS to Computer
Post by: GnatGoSplat on 27 Dec 2006, 04:26
Yeah, Mega8 has fuse bits or option bits.  I know the one needs to be set for external oscillator, but I don't know what to do about the rest.  I wonder if that's why my HU doesn't recognize M-CD?


Title: Re: IP-BUS to Computer
Post by: Vitat on 27 Dec 2006, 12:50
Yeah, Mega8 has fuse bits or option bits.  I know the one needs to be set for external oscillator, but I don't know what to do about the rest.  I wonder if that's why my HU doesn't recognize M-CD?

You don't read main site? http://www.vitat.spb.ru/eng/index.php?L1=ip-bus
You can found screenshot with fuse bits. http://www.vitat.spb.ru/files/ip-bus/lockbits&fuses.jpg


Title: Re: IP-BUS to Computer
Post by: GnatGoSplat on 29 Dec 2006, 09:23
Sorry, I did find the image earlier and forgot to update my post, but those fuse settings don't seem to work and they kill the ISP.
Maybe I didn't translate them correctly?  I am using AVRStudio4 and the fuse settings look a little different.  What program did that screenshot come from?
You have CKSEL0, CKSEL1, CKSEL2, CKSEL3 = unchecked.  Is that same as CKSEL=[0000]?  SUT0 = checked, SUT1 = unchecked, is that same as SUT=[10]?  BOOTRST=unchecked, is that same as BOOTRST=0 or BOOTRST=1?  I think AVRStudio4 BOOTRST checked is same as BOOTRST=0.

Maybe it would be easier if I just use the same program as you used, but my programmer is an Atmel Dragon so the program I use must support it.

Can you tell me the hex values of the fuse bytes?


Title: Re: IP-BUS to Computer
Post by: Vitat on 29 Dec 2006, 11:00
checked = programmed = "0"
In AVR, programmed = 0, unprogrammed = 1.

I used YAPP and I say it on main site too.


Title: Re: IP-BUS to Computer
Post by: GnatGoSplat on 03 Jan 2007, 05:24
Ok, I see YAPP.  I can't use YAPP since it doesn't support Atmel Dragon.
I found a handy fuse calculator here:
Fuse Calculator (http://palmavr.sourceforge.net/cgi-bin/fc.cgi?P_PREV=ATmega8&P=ATmega8&V_LOW=2F&V_HIGH=89&M_LOW_0x3F=0x2F&M_LOW_0x40=0x00&M_LOW_0x80=0x00&M_HIGH_0x01=&M_HIGH_0x06=0x00&M_HIGH_0x08=&M_HIGH_0x10=0x00&M_HIGH_0x20=0x00&M_HIGH_0x40=0x00&M_HIGH_0x80=&B_BODLEVEL=P&B_BODEN=P&B_SPIEN=P&B_SUT0=P&B_CKOPT=P&B_BOOTSZ1=P&B_BOOTSZ0=P&O_BITS=Apply+fuse+bits)

I think I have the fuses set correctly, 0x2F & 0xC9.
Still no communication though.  I must have a hardware problem somewhere.  :(


Title: Re: IP-BUS to Computer
Post by: GnatGoSplat on 01 Oct 2007, 06:11
Okay, I am now revisiting this project 10-months later!
Unfortunately, I was never able to get it to work.  I am almost certain the circuitry is assembled correctly, but I'm not sure.  I tried to diagnose the problem by myself, but I am lacking in any real electronics knowledge.

I took some measurements of various test points on my circuit with a scope, would somebody please take a look and tell me if anything looks wrong?

This is the schematic of my interface showing the test point locations. (http://i2.photobucket.com/albums/y15/GnatGoSplat/IPBus/LoggerSchema.gif)
TP1 - Atmega8 Pin 14 (http://i2.photobucket.com/albums/y15/GnatGoSplat/IPBus/tp1.jpg)
TP2 - 2SA733 Base (http://i2.photobucket.com/albums/y15/GnatGoSplat/IPBus/TP2.jpg)
TP3 - 2SA733 Collector (http://i2.photobucket.com/albums/y15/GnatGoSplat/IPBus/TP3.jpg)
TP4 - LM339 Pin 3 (http://i2.photobucket.com/albums/y15/GnatGoSplat/IPBus/TP4.jpg)
TP5 - LM339 Pin 1 (http://i2.photobucket.com/albums/y15/GnatGoSplat/IPBus/TP5.jpg)

IP Bus TTL signal I measured on an HA12240FP inside a CD-IB100 (http://i2.photobucket.com/albums/y15/GnatGoSplat/IPBus/ipbus_ttl_signal.jpg)

Link to the pics above (http://s2.photobucket.com/albums/y15/GnatGoSplat/IPBus/)

Any help will be greatly appreciated!


Title: Re: IP-BUS to Computer
Post by: Vitat on 03 Oct 2007, 14:09
Scope pics make with connected HU?
Can you upload firmware with diagnostic on?


Title: Re: IP-BUS to Computer
Post by: GnatGoSplat on 04 Oct 2007, 23:07
Yes, scope pics are with connected HU (Pioneer AVIC-D2).
What do you mean by upload firmware with diagnostics on?  The firmware was already uploaded.
Thanks.


Title: Re: IP-BUS to Computer
Post by: Vitat on 05 Oct 2007, 01:08
Uncomment
#define LOG
and
#define ANSWER_A1
strings. And recompile firmware. Upload to emulator. Connect emulator to PC. Open any terminal programm.