English Amiga Board


Go Back   English Amiga Board > Support > support.Hardware

 
 
Thread Tools
Old 10 January 2013, 13:04   #1
Johan1973
Registered User
 
Join Date: Dec 2012
Location: Sweden
Posts: 125
Building PS2 to Amiga mouse adapter

Hello there.
I Have been trying to build this adapter;
http://ps2m.sotchenko.ru/version.html

However, I can not get it to work. And I have no idea where it fails. Is there anyone here that has built this circuit successfully?
Johan1973 is offline  
Old 10 January 2013, 13:30   #2
kipper2k
Registered User
 
Join Date: Sep 2006
Location: Thunder Bay, Canada
Posts: 4,323
There are better circuits than that available. The one you shown has stability issues. I have (hopefully) my parts i need to complete mine this weekend and will post the schematic and firmware for it
kipper2k is offline  
Old 10 January 2013, 14:11   #3
demolition
Unregistered User
 
demolition's Avatar
 
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 43
Posts: 4,190
Quote:
Originally Posted by Johan1973 View Post
Hello there.
I Have been trying to build this adapter;
http://ps2m.sotchenko.ru/version.html

However, I can not get it to work. And I have no idea where it fails. Is there anyone here that has built this circuit successfully?
I have built that exact one and it's works great for me. Haven't seen any stability issues so far. My first one didn't work however, but was because I chose the wrong clocking method when I burned the PIC, so it was set up to RC oscillator instead of Xtal.
demolition is offline  
Old 10 January 2013, 16:16   #4
Johan1973
Registered User
 
Join Date: Dec 2012
Location: Sweden
Posts: 125
Maybe I am burning the software wrong, because I have never used PICs before. My programmer is a TL866 and the software I use is MiniPro programmer. Can you tell me how I am supposed to configure it for xtal or oscillator?

kipper2k: I am looking forward to your schematics and firmware

All I want to do is to use my old Logitech Trackball Marble for my amigas
Johan1973 is offline  
Old 10 January 2013, 17:10   #5
demolition
Unregistered User
 
demolition's Avatar
 
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 43
Posts: 4,190
I use WinPIC and it looks like this.

You should have a similar setting in your program. XT is crystal.
Attached Thumbnails
Click image for larger version

Name:	winpic.png
Views:	443
Size:	37.1 KB
ID:	33823  
demolition is offline  
Old 10 January 2013, 17:17   #6
Johan1973
Registered User
 
Join Date: Dec 2012
Location: Sweden
Posts: 125
These are the configurable settings I have;

Johan1973 is offline  
Old 10 January 2013, 23:13   #7
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
so you probably need to set those 14 configuration word bits correctly.. set them so you get a value of 3FFD like demolition has (try checking bit 1).

I'm not proficient in PIC, so I don't know if the user id values matter as well, but I suspect they don't in this case.
hooverphonique is offline  
Old 10 January 2013, 23:23   #8
Johan1973
Registered User
 
Join Date: Dec 2012
Location: Sweden
Posts: 125
After setting every bit except one, I get a response, it pushes both mouse buttons all the time which brings me to the boot menu on the amiga.
Johan1973 is offline  
Old 10 January 2013, 23:40   #9
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
does your software report the same config word as demolitions? Looking at your screenshot I would think you only have to set bit 1, not all but bit 1 (fuses, which I guess they are, are often inverted).
hooverphonique is offline  
Old 10 January 2013, 23:41   #10
Johan1973
Registered User
 
Join Date: Dec 2012
Location: Sweden
Posts: 125
No matter what bits I set, I can not get 2007 to be 3FFD.

I am completely new to PICs, this is the very first project I am doing with one, so it is a steep learning curve.

EDIT:
Turned out the "mouse buttons pressed" was a misswiring. Corrected the wiring, and it does nothing now. This is the settings I set;


Last edited by Johan1973; 11 January 2013 at 00:03.
Johan1973 is offline  
Old 11 January 2013, 00:18   #11
demolition
Unregistered User
 
demolition's Avatar
 
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 43
Posts: 4,190
I might have remembered incorrectly regarding the correct oscillator setting as that screenshot was taken from another machine (I need to get to an XP machine for writing so it wasn't available).

According to the documentation Osc should be set to HS which is 3FFE.
You will get this by only enabling bit 0 and disabling the rest.
Alternatively you can try setting it to XT (3FFD) which is just bit 1 on.
demolition is offline  
Old 11 January 2013, 00:23   #12
Johan1973
Registered User
 
Join Date: Dec 2012
Location: Sweden
Posts: 125
Quote:
Originally Posted by demolition View Post
I might have remembered incorrectly regarding the correct oscillator setting as that screenshot was taken from another machine (I need to get to an XP machine for writing so it wasn't available).

According to the documentation Osc should be set to HS which is 3FFE.
You will get this by only enabling bit 0 and disabling the rest.
Alternatively you can try setting it to XT (3FFD) which is just bit 1 on.
Both those configurations do not work.
Johan1973 is offline  
Old 11 January 2013, 00:27   #13
demolition
Unregistered User
 
demolition's Avatar
 
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 43
Posts: 4,190
Does it say 3FFE and 3FFD in the corner when you set those values? Because it seems weird to me that no tick would mean =1.

Have you tried reading back the contents of the PIC to verify that everything was written correctly?

Next, check the wiring again. If you have a voltage meter, check the voltage on all points where there should be a supply.
demolition is offline  
Old 11 January 2013, 00:31   #14
Johan1973
Registered User
 
Join Date: Dec 2012
Location: Sweden
Posts: 125
Quote:
Originally Posted by demolition View Post
Does it say 3FFE and 3FFD in the corner when you set those values? Because it seems weird to me that no tick would mean =1.

Have you tried reading back the contents of the PIC to verify that everything was written correctly?

Next, check the wiring again. If you have a voltage meter, check the voltage on all points where there should be a supply.

Yes, it says that.
There is voltage on every pin except the VSS of course. Cant say more than that since I can not see pulses. No idea if the crystal is oscillating at all.
Johan1973 is offline  
Old 11 January 2013, 09:38   #15
demolition
Unregistered User
 
demolition's Avatar
 
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 43
Posts: 4,190
If you have an oscilloscope, you should be able to see a 4MHz signal on one of the clockpins. If not, then something is wrong, so check the crystal connections and the two small capacitors connected to it. Also check if there is a clock on any of the two Osc configs above. The clock is the first thing to get going as it is independent from the rest of the wiring.
demolition is offline  
Old 11 January 2013, 12:15   #16
Loedown
Precious & fragile things
 
Join Date: Feb 2009
Location: Victoria, Australia
Posts: 1,946
PIC is indeed a steep learning curve, one issue I see with that circuit is that MCLR isn't tied high through a pull up resistor to Vdd, I don't have the PIC84A literature handy but a value of 10K to 40K should be fine. You could also simplify the circuitry by using a PIC that has an inbuilt oscillator block. I am busy like hell but if you need to know more about PIC ask, my email should be in my profile.
Loedown is offline  
Old 11 January 2013, 12:16   #17
Loedown
Precious & fragile things
 
Join Date: Feb 2009
Location: Victoria, Australia
Posts: 1,946
Quote:
Originally Posted by demolition View Post
If you have an oscilloscope, you should be able to see a 4MHz signal on one of the clockpins. If not, then something is wrong, so check the crystal connections and the two small capacitors connected to it. Also check if there is a clock on any of the two Osc configs above. The clock is the first thing to get going as it is independent from the rest of the wiring.
OSC Out is usually RA7 and it's Fosc / 4.
Loedown is offline  
Old 11 January 2013, 13:07   #18
Johan1973
Registered User
 
Join Date: Dec 2012
Location: Sweden
Posts: 125
I do not have an oscilloscope. So I can not figure out if the crystal is oscillating. Crystals have given me a hard time in the past.
Johan1973 is offline  
Old 11 January 2013, 13:36   #19
Loedown
Precious & fragile things
 
Join Date: Feb 2009
Location: Victoria, Australia
Posts: 1,946
Quote:
Originally Posted by Johan1973 View Post
I do not have an oscilloscope. So I can not figure out if the crystal is oscillating. Crystals have given me a hard time in the past.
Write code to make a led flash on one of the unused pins, keeping in mind you need to use a delay big enough to be able to see it flashing and a 270R resistor to anode to limit current.

Use the timer and loop cycle around for the overflow, update a memory location and check for Z bit

If location in ram is 0 for instance

movlw b'00010000'
movwf 0x00

clear timer0, set prescaler to 1/256, this gives a frequency ~63 Hz, then by dividing that by ram 0 (16) gives 4 Hz, very visible, as you use one cycle to clear the led and the next to set it then it's divided by 2 again and gives 2 Hz.

After the above commands you loop around on the timer0 interrupt, wait for it then clear the interrupt in a routine and then set the led on or off. Below is the code for 12F675 that I wrote as my first project.

Code:
        #include P12F675.INC
;******************************************************
        org     0000
        bcf     status,5        
        clrf    gpio
        movlw    b'00000111'
        movwf    cmcon
        movlw    b'00000000'
        movwf    intcon
        movlw    b'00110101'
        movwf    t1con
        bsf     status,5
        clrf    trisio
        movlw     b'00000001'
        movwf    pie1
        movlw    b'11000111'
        movwf    option_reg
        clrf    ansel
        bcf     status,5
;******************************************************
loop    movlw    b'00100000'
        btfsc     intcon,2
        xorwf    gpio
        movlw    b'00010000'
        btfsc    pir1,0
        xorwf    gpio
        bcf        pir1,0
        bcf        intcon,2
        goto     loop        
    end
Top part is setup bottom part is the timer loop XORWF will exclusive OR the led output bit. The code isn't pretty but functional, later PICs have BTG ( BiTtoGgle )
Loedown is offline  
Old 11 January 2013, 20:33   #20
Johan1973
Registered User
 
Join Date: Dec 2012
Location: Sweden
Posts: 125
Easier said than done.. I need to learn everything from the ground up. How to make project, how to program the chip, etc.
Johan1973 is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Idea for internal PS2 mouse adapter -All Amiga models kipper2k Hardware mods 106 11 June 2013 10:20
PS2/usb mouse adapter Jerry support.Hardware 9 08 May 2012 10:25
Amiga Adapter - Connect Ps2 / Usb Mouse Brosol MarketPlace 0 16 February 2010 07:06
P2AM : amiga/atari PS2-mouse adapter, 15eur keropi Amiga scene 5 24 April 2008 09:30
New Amiga mouse PS2 adapter - Anyone tested it? J.Junior support.Hardware 9 31 December 2006 16:18

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 23:52.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10198 seconds with 14 queries