Hide minor edits - Show changes to output
!!Troubleshooting
What can you do if it doesn't work.
*when you connect, does anything happen on the HU?
**No: Check that your pic is working by programming a blinking pin hex file. Use a multimeter to see if the pin is blinking. Try an hex from [[http://www.voti.nl/blink/index_1.html#16F84A|there]]. Make sure that when you program, you use the external oscilator (HS mode)
**Yes: your pic seems to be doing something but it is wrong.
***First check that you have the latest version from the subversion repository.
***Check that you have good frequency settings inside the GNUnilink.asm file and recompile.
*** If it still doesn't work, you will have to log with a serial line and the python logger then post the results in the forum.
The JVC KS-U15K adapter has one end which is similar to the unilink connector and is pretty cheap (around ~$10 US). It should also work.
The JVC [=KS-U15K=] adapter has one end which is similar to the unilink connector and is pretty cheap (around ~$10 US). It should also work.
The JVC KS-U15K adapter has one end which is similar to the unilink connector and is pretty cheap (around ~$10 US). It should also work.
! pre compiled GNUnilink version
* Attach:GNUnilink-r12-16f627-20mhz-38400baudlog.hex : compiled for 16f627 at 20mhz with serial log enabled at 38400bit/s
! pre compiled GNUnilink version
* Attach:GNUnilink-r12-16f627-20mhz-38400baudlog.hex : compiled for 16f627 at 20mhz with serial log enabled at 38400bit/s
! Schematics
If you don't have a pic programmer, I suggest that you implement an in situ programmer.
!!In situ Schaer programmer
If you don't have a programmer, you can make one on the same board, so you don't have to unmount your pic device each time you want to program the pic.
You can then program the pic directly in the gnunilink.
The [[http://www.ic-prog.com/hschaer.htm|original schaer programmer schematic]] is the base. It is compatible with [[http://www.ic-prog.com/|icprog]] and uses the parallel port.
For the power take the 12v from the unilink connector and the 5v from the regulator (the same from your pic)
[=
5v
|14
5V-[10K]--+ +---------+--------+
1|\ 2 | 13| |
D0 (2)-----------+ >--------------+-------+ RB7/Data |
|/ | | |
+5V-[10k]-+ | | |
| 12 /|13 | | PIC 16C84 |
Busy (11)-------+--< +--------------+ | 18 pin |
\| | ZIF Socket |
5V-[10k]--+ | |
3|\ 4 | 12| |
D1 (3)----------+ >---------------+------+ RB6/Clock |
|/ | |
12V-[10K]--+ | |
5|\ 6 | | |
D2 (4)----------+ >---------------+-o 4| |
|/ o----+ -MCLR/Vpp |
(7407) 5v--o +---------+--------+
|5
GND
5V
|14
+--+--+
| 7407|
+--+--+
|7
GND
=]
If you have a 7407, do like the original.
I did not have 7407 so I used NPN transistors.
The simplification is that you only need 2 open collector inverter that you can implement with a npn transistor:
the one from D0 to `RB7
and the one from D2 to MCLR
if you do the simplification dont forget to invert the data out and clock in icprog.
For MCLR, I used a 3 way jumper selecting the programming or the functionnal mode. There surely is an automatic way but I did not test it.
You dont need the power control part of the schaer programmer (the D3 pin)
If you don't have a pic programmer, I suggest that you implement an in situ programmer. (see the [[Schematics]])
5|\ 6 | 4| |
D2 (4)----------+ >---------------+-o | |
5|\ 6 | | |
D2 (4)----------+ >---------------+-o 4| |
Vdd
5v
Vdd-[10K]--+ +---------+--------+
5V-[10K]--+ +---------+--------+
Vdd-[10k]--+ | |
5V-[10k]--+ | |
Vpp-[10K]--+ | |
12V-[10K]--+ | |
D2 (4)----------+ >---------------+------+ -MCLR/Vpp |
|/ | |
+---------+--------+
D2 (4)----------+ >---------------+-o | |
|/ o----+ -MCLR/Vpp |
(7407) 5v--o +---------+--------+
5V
|14
+--+--+
| 7407|
+--+--+
|7
GND
For the power take the 12v from the unilink connector and the 5v from the regulator
For the power take the 12v from the unilink connector and the 5v from the regulator (the same from your pic)
[=
Vdd
|14
Vdd-[10K]--+ +---------+--------+
1|\ 2 | 13| |
D0 (2)-----------+ >--------------+-------+ RB7/Data |
|/ | | |
+5V-[10k]-+ | | |
| 12 /|13 | | PIC 16C84 |
Busy (11)-------+--< +--------------+ | 18 pin |
\| | ZIF Socket |
Vdd-[10k]--+ | |
3|\ 4 | 12| |
D1 (3)----------+ >---------------+------+ RB6/Clock |
|/ | |
Vpp-[10K]--+ | |
5|\ 6 | 4| |
D2 (4)----------+ >---------------+------+ -MCLR/Vpp |
|/ | |
+---------+--------+
|5
GND
=]
version francaise dans FrenchHowto
You don't need to use the max202. As the software uart can invert the serial pin, it is possible to log the data with a direct rs232 cable connection to the pic. In this case, you will have to swap the SERIAL_0 and SERIAL_1 in the source code.
You can choose any pic PIO pin to communicate. (I think I use port B3)
You don't need to use the max202. As the software uart can invert the serial pin, it is possible to log the data with a direct rs232 cable connection to the pic. In this case, you will have to swap the SERIAL_0 and SERIAL_1 in the source code (but the archos communication won't work anymore). (please look at [[GNUnilink/Faq]] for more info)
You can choose any pic PIO pin to communicate. (I think I use port `RB2 on pin 8) It is defined by the SERIAL_PORT define in `GNUnilink.asm.
For MCLR, I used a 3 way jumper selecting the programming or the functionnal more. There surely is an automatic way but I did not test it.
For MCLR, I used a 3 way jumper selecting the programming or the functionnal mode. There surely is an automatic way but I did not test it.
Contact me in the forum for more details on the mod.
For the archos players, a hardware mod is needed. I connected the On button wire to one of the line in connector wire. Some photos in [[Main/Archos]]
The other end is directly connected to one of the pic pins (see the [[Schematics]])
more to come...
Contact me in the forum for more details on the mod.
!!Recompiling the GNUnilink source
The source files are compiled with 'gnu pic utils' ([[http://gputils.sourceforge.net/|gputils]]).
gputils works on most platforms.
Personally, I recompiled gputils under cygwin under windows. To do that,
* download and install [[http://www.cygwin.com|cygwin]]. In the setup.exe you need to check some packages to be installed: gcc, gmake (maybe some others are needed).
*download the gputils sources,
*type @@./configure@@
*type @@make install@@
There is also a native windows version that I haven't tested.
To test if it works, just type 'gpasm'.
Once gpasm works, download the GNUnilink source from [[http:/files|here]] or from the [[Subversion]] repository.
Once in the GNUnilink directory, just type gpasm `GNUnilink.asm. You will obtain the `GNUnilink.hex that you can program into the pic with [[http://www.icprog.com|IcProg]].
It is normal that you have lots of messages like @@ Register in operand not in bank 0. Ensure bank bits are correct@@ Other messages are not normal...
The schematic is very simple. There are very few components.
The [[Schematics | schematic]] is very simple. There are very few components.
You don't need to use the max202. As the software uart can invert the serial pin, it is possible to log the data with a direct rs232 cable connection to the pic. In this case, you will have to swap the SERIAL_0 and SERIAL_1 in the source code.
To program the pic directly in the gnunilink, I implemented a programmer compatible with ic-prog on the parallel port.
The original schaer programmer schematic is the base.
For the power take the 12v from the unilink connector and the 5v from the regulator
If you don't have a programmer, you can make one on the same board, so you don't have to unmount your pic device each time you want to program the pic.
You can then program the pic directly in the gnunilink.
if you have a 7407, do like the original.
The [[http://www.ic-prog.com/hschaer.htm|original schaer programmer schematic]] is the base. It is compatible with [[http://www.ic-prog.com/|icprog]] and uses the parallel port.
For the power take the 12v from the unilink connector and the 5v from the regulator
If you have a 7407, do like the original.
the one from D0 to "RB7"
the one from D0 to `RB7
contact me in the forum for more details on the mod.
Contact me in the forum for more details on the mod.
The schematic is very simple. There are very few components.
The main component is a PIC microcontroller which needs to be programmed (which is also easy to make)
The unilink connector is quite complicated. You will need to get a cable from a sony retailer (very expensive) or from a car radio installer. They sometime have some damaged unilink cables that you can get and cut to connect to the pic board.
You need a generic board, place the components and connect the few needed connections.
The original schematic is on the original [[http://gnunilink.sourceforge.net/|Gnunilink project website]].
The serial communication between pic and archos is totally handled by software. The pic uart is not used because I don't have a 16f628 and I don't think it is possible to perform an open collector communication with it.
You can choose any pic PIO pin to communicate. (I think I use port B3)
Make a direct connection. Then just add a 10k pull up resistor to the PIC vcc.
If you don't have a pic programmer, I suggest that you implement an in situ programmer.
!!In situ Schaer programmer
To program the pic directly in the gnunilink, I implemented a programmer compatible with ic-prog on the parallel port.
The original schaer programmer schematic is the base.
For the power take the 12v from the unilink connector and the 5v from the regulator
if you have a 7407, do like the original.
I did not have 7407 so I used NPN transistors.
The simplification is that you only need 2 open collector inverter that you can implement with a npn transistor:
the one from D0 to "RB7"
and the one from D2 to MCLR
if you do the simplification dont forget to invert the data out and clock in icprog.
For MCLR, I used a 3 way jumper selecting the programming or the functionnal more. There surely is an automatic way but I did not test it.
You dont need the power control part of the schaer programmer (the D3 pin)
!!Auto power on
It is a MUST HAVE feature. When you start your car, the archos is started automatically.
To do that I moded my player because it cannot be flashed. Flashed recorders can start automatically with power applied.
The gnunilink does have 2 control signals: one for controling the power through a power transistor, one for simulating the 'ON' button push.
contact me in the forum for more details on the mod.