Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:24 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/WEB V5.07.08 release candidates

     Page 17 of 18    
Author Message
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 04:23pm 28 Nov 2023
Copy link to clipboard 
Print this post

Hi,
I'm attempting to connect a Wii classic to a pico, but I'm currently failing, I would just like confirmation that the signals I am getting on the I2C look correct, before I right off the Wii controller?
I have tried with and without 10K pull up resistors, no difference, I always get the error:-
[1] Device WII OPEN keys
Error : Wii device not connected1
My options are displayed in the image, I'm using I2C on GP26,GP27, I have also tried GP16,GP17.
In the image channel 0 upper GP26 data and channel 1 lower is GP27 clock.
This is the whole trace, from when I run the test program, until it errors out.



Thanks for any input.
Regards Kevin.
Edited 2023-11-29 02:26 by Bleep
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4243
Posted: 05:13pm 28 Nov 2023
Copy link to clipboard 
Print this post

The WII does not acknowledge I2C device address &h52 (&b1010010).

Are SDA and SCL swapped? Is &h52 correct? Normally the &h5x series is reserved for eeproms like 24C32.

Volhout.
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4243
Posted: 05:15pm 28 Nov 2023
Copy link to clipboard 
Print this post

The WII does not acknowledge I2C device address &h52 (&b1010010).

Are SDA and SCL swapped? Is &h52 correct? Normally the &h5x series is reserved for eeproms like 24C32.

Volhout.
PicomiteVGA PETSCII ROBOTS
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 05:42pm 28 Nov 2023
Copy link to clipboard 
Print this post

Hi Harm,
I have no idea if &h52 is correct for the Wii classic, I'm simply using the new Wii driver that Peter put in the latest firmware, I'll see if I can find out from somewhere.
Regards Kevin.
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 05:55pm 28 Nov 2023
Copy link to clipboard 
Print this post

According to Adafruit &h52 is correct.
This is the controller I got.
Wii Classic controller on Ebay
I'm beginning to think it's duff, I'm fairly certain I got sda & scl the right way round.
Regards Kevin.
Edited 2023-11-29 03:57 by Bleep
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 05:57pm 28 Nov 2023
Copy link to clipboard 
Print this post

I think that address is correct. I've seen it mentioned elsewhere. and here

You have to send it a code to tell it which data format you want. Could that be it?
Edited 2023-11-29 03:58 by Mixtel90
Mick

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

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 218
Posted: 06:26pm 28 Nov 2023
Copy link to clipboard 
Print this post

@matherp

Since I am testing PicoMightVGA on another platform, I assembled an MMBASIC system for myself from source codes taken from https://github.com/UKTailwind/PicoMite
But the last update (PicoMite V5.07.08RC19) there was two weeks ago.
Where can I download the latest source code for release candidates?
PicoMite V5.07.08RC21

Regards javavi.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 06:40pm 28 Nov 2023
Copy link to clipboard 
Print this post

You can find them Here.
I have problems with this site and can only download properly using Edge.

All the RC files for the PicoMite platform are in a single zip file. There is no source for the latest ones, I don't think. Probably wouldn't help if there was as Peter is modifying a lot of it.
Edited 2023-11-29 04:42 by Mixtel90
Mick

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

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6099
Posted: 07:28pm 28 Nov 2023
Copy link to clipboard 
Print this post

  Bleep said  Hi,
I'm attempting to connect a Wii classic to a pico, but I'm currently failing, I would just like confirmation that the signals I am getting on the I2C look correct, before I right off the Wii controller?

Thanks for any input.
Regards Kevin.

THis code will find the port s in use
 ' i2c open 400,200
 PRINT "System I2C Address Scanner"
 ' Prep table
 PRINT "     0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F"
 ' loop col/row
 FOR y=0 TO 7
   PRINT HEX$(y,2);": ";
   FOR x=0 TO 15
     addr = y*16+x               ' calc address
     I2C WRITE addr, 0, 1, &H00  ' write zerp to that adress
     IF MM.I2C=0 THEN            ' check for errors
       PRINT HEX$(addr,2);" ";   ' found one!
     ELSE
       PRINT "-- ";               ' nothing here..
     ENDIF
   NEXT x
   PRINT
 NEXT y
 PRINT MM.DEVICE$, MM.VER
 'i2c close


Jim
VK7JH
MMedit   MMBasic Help
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 07:32pm 28 Nov 2023
Copy link to clipboard 
Print this post

Hi Jim,
That looks interesting, it might at least tell me if the controller is doing anything at all, thank you.
Regards Kevin
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4243
Posted: 09:19pm 28 Nov 2023
Copy link to clipboard 
Print this post

The waveform Kevin showed tells us that the controller is not listening to &h52, so it is not possible to configure it.
First you need to find its address.
Hence the tool Jim showed.

Volhout

P.s. There is also a WII classic PRO controller. Also think that of you have 2 or 3 of these controllers on onze I2C bus, they need to have different adresssen. Maybe this one is &h54,,?
Edited 2023-11-29 07:44 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9122
Posted: 08:44am 29 Nov 2023
Copy link to clipboard 
Print this post

  Quote  I'm beginning to think it's duff,


Best is to include "genuine" in your search e.g.
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 12:35pm 29 Nov 2023
Copy link to clipboard 
Print this post

I've tried Jims address scanner and am not getting any response on any address, I did change his code to look on I2C2 which is the port that GP26,GP27 are on, so I think this controller is duff.
I'll try looking for a 'genuine' one and see how that goes.
Regards, Kevin.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 08:58pm 29 Nov 2023
Copy link to clipboard 
Print this post

  Volhout said  Are SDA and SCL swapped?

Have you tried that yet?

Perhaps it needs 5V.
Edited 2023-11-30 07:01 by phil99
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 09:24pm 29 Nov 2023
Copy link to clipboard 
Print this post

If it needs 5V it isn't suitable for a WII. Officially all the controllers are 3V3.
Mick

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

Guru

Joined: 05/11/2021
Location: Germany
Posts: 351
Posted: 09:33pm 29 Nov 2023
Copy link to clipboard 
Print this post

hallo phil99, hallo Peter.

Thanks for the feedback and sorry for the late response.

Unfortunately it doesn't work and I took another WebMite (pico) and tested it again. But even the SD card is not addressed.
With the old Pico without Wi-Fi and the same display! And the old firmware works: PicoMite MMBasic Version 5.07.01

  matherp said  Phil

Thanks for confirming it is all working - saves me breaking out the scope.
I did make a change recently to increase the PWM frequency from 1KHz to 50KHz to take it out of the audio range as it was introducing interference on audio. Why this should have an impact on homa's display I don't know.


  phil99 said  
Change Backlight to another pin and setup GP13 with PWM to see if that works.


Unfortunately, this will not be so easy. This module is:



  phil99 said  Edit
I don't know if this is related to Homa's Backlight issue but there seems to be a little quirk. When setting the backlight to gp17 (lowercase) it came out on GP7 instead. Both in Option List and the actual pin. If uppercase GP17 is used backlight is on GP17. Standard PicoMite.

This is repeatable.


Upper and lower case, with spaces after the coma or without, neither helped.


> option list
WebMite MMBasic Version 5.07.08RC21
OPTION SYSTEM SPI GP10,GP11,GP12
OPTION SDCARD GP22
> b:
> files
Error : SD Card not found
>
> option list
WebMite MMBasic Version 5.07.08RC21
OPTION SYSTEM SPI GP10,GP11,GP12
OPTION SDCARD GP22
> OPTION LCDPANEL ILI9488W, RLANDSCAPE,GP8,GP15,GP9,GP13
WebMite MMBasic Version 5.07.08RC21
Copyright 2011-2023 Geoff Graham
Copyright 2016-2023 Peter Mather

> gui test lcdpanel


The test goes and the display shows the circles...
Is there still hope for a solution?

Matthias
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6099
Posted: 09:42pm 29 Nov 2023
Copy link to clipboard 
Print this post

  homa said  
  phil99 said  
Change Backlight to another pin and setup GP13 with PWM to see if that works.


Unfortunately, this will not be so easy. This module is:


Omit the backlight pin when you configure the display
(Backlight is optional)

> OPTION LCDPANEL ILI9488W, RLANDSCAPE,GP8,GP15,GP9 ',GP13

That way you can set pin GP13 as PWM and test different settings for backlight control using PWM

Jim
VK7JH
MMedit   MMBasic Help
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 10:08pm 29 Nov 2023
Copy link to clipboard 
Print this post

Jim beat me to it while testing but here it is anyway.

Remove the backlight setting from OPTION LCDPANEL
then enable PWM on GP13, controlling the brightness with the PWM command.

OPTION LCDPANEL DISABLE

OPTION LCDPANEL ILI9488W, RLANDSCAPE,GP8,GP15,GP9

SETPIN GP13, PWM6B
PWM 6, 1000, , 50

Tested on a WebMite ok.

Edit
Include PWM in MM.Startup to automatically enable it.
Sub MM.Startup
  SETPIN GP13, PWM6B
  PWM 6, 1000, , 50
End Sub

Edited 2023-11-30 08:24 by phil99
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 351
Posted: 10:11pm 29 Nov 2023
Copy link to clipboard 
Print this post

Hello Jim, good advice, the result:


> option list
WebMite MMBasic Version 5.07.08RC21
OPTION SYSTEM SPI GP10,GP11,GP12
OPTION LCDPANEL ILI9488W, RLANDSCAPE,GP8,GP15,GP9,GP13
OPTION SDCARD GP22
> option lcdpanel disable
WebMite MMBasic Version 5.07.08RC21
Copyright 2011-2023 Geoff Graham
Copyright 2016-2023 Peter Mather

> OPTION LCDPANEL ILI9488W, RLANDSCAPE,GP8,GP15,GP9
WebMite MMBasic Version 5.07.08RC21
Copyright 2011-2023 Geoff Graham
Copyright 2016-2023 Peter Mather

> gui test lcdpanel
> setpin gp13,pwm6b                 'display goes dark

> pwm 6,200,,50
> pwm 6,200,,5
> pwm 6,200,,95
> pwm 6,200,,30
> pwm 6,200,,40
>


WORKS!
Conclusion, must be a bug, sorry Peter.
... and what about the SD card?
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 351
Posted: 10:16pm 29 Nov 2023
Copy link to clipboard 
Print this post

Thanks also to phil99!
 
     Page 17 of 18    
Print this page
© JAQ Software 2024