Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 01:35 27 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMite VGA Basic - new design

     Page 2 of 2    
Author Message
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4238
Posted: 09:11am 18 Dec 2023
Copy link to clipboard 
Print this post

Hi Mick,

I assume this is what you implemented on GP0/GP1 of the pico ? I guess the Wii classic controller also plugs in the Wii controller as the nunchuck does, same connection, so it should interface the same. Below is from Arduino, but may apply to pico also.



Volhout
Edited 2023-12-18 19:15 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6792
Posted: 11:46am 18 Dec 2023
Copy link to clipboard 
Print this post

That's the general idea, yes.

The pin numbers mark the connector as having the notch at the bottom, and wiki is wrong about the pin numbering direction!

The proper socket is non-reversible and the plug latches into it. The CMM2 PCB also has the little notches (as does the V2 version of this board) but only the front panel makes it non-reversible. Inverting the plug reverses the supply polarity to the controller so you have to get it right!.

The centre top pin is "Device Detect" and I can find no information about it other than it's linked to the 3V3 pin at the controller. I've tested this today, and it's correct for the genuine controller anyway. The centre bottom pin (by the notch) is unused. I am  now going to power the controller via the Device Detect pin and use the 3V3 pin for detection. In this way the controller is probably better protected if someone plugs it in upside down as it won't get 3V3.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6792
Posted: 08:27pm 18 Dec 2023
Copy link to clipboard 
Print this post

Circuit & gerbers. I've tweaked a bit and added space for a CR2032 underneath for those who would like a proper battery for their RTC.  :)

circuit V2.zip

gerber.zip
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4238
Posted: 03:26pm 04 Jan 2024
Copy link to clipboard 
Print this post

Hi Mick,

See here your V2 design....



Remarks so far:
- technically the coffe beans for GP3 and 3V3 must be reversed default.
- the text "OPTION SYSTEM I2C GP26,GP27" on the bottom is not compatible with WII remote. Since WII remote needs "OPTION SYSTEM I2C GP0,GP1" and there can onloy be one SYSTEM I2C.

But the board works...

Volhout.
Edited 2024-01-05 01:28 by Volhout
PicomiteVGA PETSCII ROBOTS
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 479
Posted: 04:59pm 04 Jan 2024
Copy link to clipboard 
Print this post

Beautiful

When can I buy one?  
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4238
Posted: 05:20pm 04 Jan 2024
Copy link to clipboard 
Print this post

Hi LeoNicolas,

It was designed as a kit for the 8bit guy. I do have spare pcb and components, and I can pre-assemble the micro sd card reader (fine pitch). But it is a kit. You need to do some soldering.
If you are interested, I can send it.
Just tell me if you want the pico too, maybe you buy that locally.

Volhout
PicomiteVGA PETSCII ROBOTS
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 479
Posted: 05:36pm 04 Jan 2024
Copy link to clipboard 
Print this post

Great! I can buy the kit from you, including the pico too. I can do the components soldering. It will be very useful for testing Knighgmare on it  
I will send you a private message with my email.

Thank you very much Volhout
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6792
Posted: 06:46pm 04 Jan 2024
Copy link to clipboard 
Print this post

Thanks Volhout.
Interesting that you needed to swap the links. By default it powers the controller via the DD pin and uses the 3V3 pin as device detect. That allows the controller to be plugged in upside down without damage. On the controller that I have DD is linked to 3V3 at the controller so it doesn't matter which pin is used for supply. That's why I included the links - so that it could be set to "normal" if necessary.  :)

Yep - I messed up on the silkscreen. Oh well, at least the circuit diagram is right. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4238
Posted: 08:16pm 04 Jan 2024
Copy link to clipboard 
Print this post

Hi Mick,

Yes, you explained that earlier. And honestly, I swapped it back to original. I had measured my nunchuck, and thought there was an impedance between DD and +3V3, but that appeared to be an empty battery on the multimeter (the warning symbol had been there for ages, but I was so used to it I ignored it for weeks).

Since the DD-3V3 impedance was 0, I agree with the build in protection by supplying 3V3 at the DD pin.

See attached code for reading the nunchuck

'read nunchuck registers
'assumes OPTION SYSTEM I2C is set

option default integer
const nunch=&h52    'I2C device address

'init
dim x(5)
setpin gp3,din

'check if connected
if pin(gp3)=0 then print "no WII nunchuck plugged in, exit":end

'yes, go on
print:print "Wii device connected"
init_no_enc
read_id
id=((x(2)*256+x(3))*256+x(4))*256+x(5)
print "device = &h";hex$(id)
if id=&hA4200000 then print "WII nunchuck plugged in":print

print "X-joy  Y-joy   X-acc   Y-acc   Z-acc  But-C   But-Z"

'main loop
do
 read_val
 xa=4*x(2) + ((x(5)and &b11000000)>>6)
 ya=4*x(3) + ((x(5)and &b00110000)>>4)
 za=4*x(4) + ((x(5)and &b00001100)>>2)
 c_but=(x(5)and &b00000010)>>1
 z_but=(x(5)and &b00000001)
 print x(0),x(1),xa,ya,za,c_but,z_but
 pause 100
loop

sub init_no_enc
 I2C write nunch,0,2,&h40,&h00
 pause 10
 I2C write nunch,0,2,&hF0,&h55
 I2C write nunch,0,2,&hFB,&h00  
end sub

sub read_id
 I2C write nunch,0,1,&hFA
 I2C read nunch,0,6,x()
end sub

sub read_val
 I2C write nunch,0,1,&h00
 pause 1 'needed for nunchuck response....
 I2C read nunch,0,6,x()
end sub


Volhout

P.S. note the 2 pause statements. These are needed for the nunchuck to respond/execute reset. The pico is too fast otherwise...
Edited 2024-01-05 06:18 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6792
Posted: 10:48pm 04 Jan 2024
Copy link to clipboard 
Print this post

I've now fixed the silkscreen so the wrong info might not escape again. :)
Board revised to 2.1.


------------------------------

EDIT:

It may not be a good idea to rely on a DD input to check for the device. I used it on this board because I had a spare input, but that may not be the case on PicoGAME 4. :)
Edited 2024-01-06 06:15 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024