Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 02:48 05 May 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: PicoGAME VGA development

     Page 12 of 31    
Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 07:39pm 27 Apr 2022
Copy link to clipboard 
Print this post

  Mixtel90 said  A couple of BASIC files to play with on your new toy.

BASfiles proto.zip


Very impressive and comprehensive test-suite . This little board really deserves more attention than it is getting.

I've got graphics sorted out now so its audio next and then for completeness the USB-A polarity hack.

My keyboard is still "a bit funny" when running from the 4.8V wall-wart with the diode shorted so I suspect there is a chance it won't work at all with the Shottky diode. Before releasing the gerbils is it worth adding a jumpered bypass around that diode, because most people won't find out they need to have it shorted until after they've installed it ?

I've tested my new Laser Cycle game on the PicoGAME VGA and it works (almost) out of the box, there are just a couple of bits where the graphics update too slow and need a more efficient algorithm - didn't notice on MMB4W for obvious reasons. Plus I need to add the code for the controllers and get some different music.

My big "problem" now is that I really want to be doing my PicoGAME development from Linux rather than Windows which means I should invest time in MMB4L and gonzo (my file transfer / PicoMite remote access program) rather than playing .

Best wishes,

Tom
Edited 2022-04-28 05:59 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5739
Posted: 08:44pm 27 Apr 2022
Copy link to clipboard 
Print this post

You were lucky I didn't include my Super El Cheapo flight simulator! You could spend/waste many a happy hour "flying" a single horizon line with no detail whatsoever. :)

The area round there is a bit more cramped on the new layout so I'm not sure about space for an extra link. It would be easy enough to link it with bare wire under the board anyway - there's no track passing under it.

=========================================

Speaking of the new Version 1.4.......  It's here. :)

PicoGameNES14.zip

.
Mick

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

Guru

Joined: 11/02/2018
Location: Australia
Posts: 1795
Posted: 11:28pm 27 Apr 2022
Copy link to clipboard 
Print this post

Another thought on the keyboard. All 5V devices are supposed to work correctly down to 4.5V, so 4.8V without the diode should be enough.
Perhaps it is fussy about the value of the pullup resistors.
To test this tack a pair of 10k resistors across them and see if that improves it.

Edit.
Looking back through this thread I can't see any provision for pullup resistors, unless they are on the level shifter board. Many KBs have their own but perhaps yours doesn't. The 5V HP KB I mentioned before doesn't, which is an advantage as with pullups going to 3.3V instead of 5V I don't need the level shifters to make it work on the Pico.

Edit 2.
The circuit diagram on page 2 does not show any link from the level shifter board to 5V so I doubt it has any pullups. Add 4k7 to 10k resistors from the Data and Clock pins to 5V.
Edited 2022-04-28 10:07 by phil99
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1593
Posted: 06:00am 28 Apr 2022
Copy link to clipboard 
Print this post

Mick, A bit late now I suppose but an additional pad for the Schottky diode so a link could be used instead of a diode would have been handy. Leave the link out until you are sure the polarity is correct.

Bill
Keep safe. Live long and prosper.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5739
Posted: 06:38am 28 Apr 2022
Copy link to clipboard 
Print this post

@phil99
The 5V supply to the level shifter is definitely there, although it may not be completely obvious from the circuit diagram as it's just a label. :) The shifter module is just four of the usual mosfet circuits and includes 10k pullups to both 5V and 3V3 for each. It might be worth tacking a couple of extra 10k pull ups on to see if it improves things.

@Turbo46
Why not just leave the diode out until you know the polarity is correct? Something to consider for Version 1.5, maybe. :)

There's nothing different about powering this board than powering a CMM2 or similar. It's almost an identical input circuit, but this has the advantages that the current is lower and  that it doesn't get the problem of high resistance USB leads for its power supply. It also has the same problem that you need 5V at the input terminals for it to work properly - an LDO reg can only do so much. If you can't get that then you need to check your power supply and lead.
Mick

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

Guru

Joined: 11/02/2018
Location: Australia
Posts: 1795
Posted: 07:49am 28 Apr 2022
Copy link to clipboard 
Print this post

"The 5V supply to the level shifter is definitely there, although it may not be completely obvious from the circuit diagram as it's just a label. :) The shifter module is just four of the usual mosfet circuits and includes 10k pullups to both 5V and 3V3 for each. It might be worth tacking a couple of extra 10k pull ups on to see if it improves things."

Since the level shifter board has 2 spare units with pullups the easiest way is to link them in parallel with the first two at both 5v and 3.3V sides. No extra parts hanging off the board.

Edit. Had a closer look at the circuit. The 5V supply is drawn clearly. Going blind as well as senile.
Edited 2022-04-28 17:54 by phil99
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5739
Posted: 08:14am 28 Apr 2022
Copy link to clipboard 
Print this post

There are pads under the module for pullups to be used (R34 & R36) if the mosfet option is used. If the module plugs in then those could be used.

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

If it's of any interest, I've just done an experimental 1.4A version. Changes are as follows:
1. A 2-way link after the barrel jack centre pin. This allows connection to either side of D1. It could be hard wired or a removable link. May be useful for measuring the current draw or linking out D1. Note that this is perhaps getting a little close to U1 if it is fitted.
2. Positions for capacitors in series with the audio output socket, together with bleed resistors from each output to ground. This arrangement would be useful if someone is having problems with the presence of DC on the output. The caps can be linked out and the resistors not fitted if these are not required.
Mick

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

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 09:25am 28 Apr 2022
Copy link to clipboard 
Print this post

  phil99 said  Add 4k7 to 10k resistors from the Data and Clock pins to 5V.


This is all sounding suspiciously like the rabbit hole that Turbo46 and I went down with my original NES/Famicom controller several years ago.

I'm going to wait until the Schottky diodes I ordered arrive and then move on from there. For educational purposed I will in parallel hook up the PS/2 keyboard in question so I can use a multimeter to try and determine what pull-ups are present within - don't really want to dismantle it just to find an epoxy blob.

I know I should be using a better power supply but I've limited sockets (even with multi-ways) in my workbench / cubby-hole so ideally want to use those (weak) USB ports in the sockets if I can.

  Mixtel90 said  Speaking of the new Version 1.4.......  It's here. :)


That is one spectacularly busy looking board, if you've going to squeeze anything else on that you are going to have to start using SMD components.

I'm going to give it a week for the smoke to settle and for you to change your mind and others to comment (I've never known @Volhout not to have a comment on a PCB ) and then I'll order some boards - perhaps purple this time ? 2 for me, 2 for you and 1 for @Volhout. If anyone else in UK/Europe wants a board then I can order more and post at near-cost, for the rest of the world it's almost certainly cheaper to order 5 boards direct from the fabricator even if you only want one - WTF is that all about ?

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5739
Posted: 12:41pm 28 Apr 2022
Copy link to clipboard 
Print this post

I don't think I can fit any more on now. There was space at the front LHS but that's got the RTC in it now, and Version 1.4A has  put capacitors in the spare space at the front RHS. :)  I could put the level shifter underneath the PicoMite, but you can't make it plug in then - and it's more difficult to find somewhere to put mosfets and resistors as an alternative. I've moved the new link a bit so it's not in the way of U1 now.
Mick

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

Joined: 06/07/2019
Location: United States
Posts: 175
Posted: 02:32pm 28 Apr 2022
Copy link to clipboard 
Print this post

Mick, Tom,
I’m thankful to see your board design progress - hopeful the revised board will be released soon.

FYI I was just on JLCPCB and noticed they will be shutdown a few days for vacations:
‘ Holiday Notice: the holiday is from April 30th to May 2nd. Orders placed during this period will be processed from May 3rd.’   This vacation will affect their shipping services also - more info at JLCPCB.COM

Tom,
No offense, but I don’t understand why you are continuing to use a Power supply that is out of spec at 4.8 volts. Please switch to a different power supply. If you are like me, you probably have some old Powered USB1.1 hubs that would fine as a 5v power supply.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 02:34pm 28 Apr 2022
Copy link to clipboard 
Print this post

  al18 said  No offense, but I don’t understand why you are continuing to use a Power supply that is out of spec at 4.8 volts. Please switch to a different power supply. If you are like me, you probably have some old Powered USB1.1 hubs that would fine as a 5v power supply.


No offence taken. The problem is to do with a lack of free physical sockets in my workspace area to plug into, whereas the multiway sockets I am already using also provide a total of 5 USB power sockets - alas these are proving to be subpar when it comes to delivering 5V. I'll work it out.

Best wishes,

Tom
Edited 2022-04-29 00:39 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5739
Posted: 02:49pm 28 Apr 2022
Copy link to clipboard 
Print this post

Do you want the current 1.4A version, al18? This is still a "playing" version. The official current version is 1.4, which I posted yesterday.

I won't guarantee that 1.4A won't change - possibly even on a daily basis if I feel like it. On the other hand I might not bother as it's getting hard work to think of enhancements that won't mess something up. :)

Personally, I've just put an order in for 5 of Version 1.4 (in blue because I also have a transparent blue case on back-order from RS) - I don't need the extra bits and don't mind patching them in if I change my mind later.


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

Sounds like you need a nice little powered 5V hub to get those supplies, Tom, and swap one or both of your extension blocks for ordinary ones. There are some nice 3.0 and 3.1 ones with switched outputs on Amazon. I got a 7-way not long ago.
.
Edited 2022-04-29 01:01 by Mixtel90
Mick

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

Joined: 06/07/2019
Location: United States
Posts: 175
Posted: 02:59pm 28 Apr 2022
Copy link to clipboard 
Print this post

Mick,
Thanks for the reminder that you posted 1.4 yesterday. I missed that.
 
al18
Senior Member

Joined: 06/07/2019
Location: United States
Posts: 175
Posted: 05:01pm 28 Apr 2022
Copy link to clipboard 
Print this post

Mick,
I noticed pin 4 on the VGA connector is grounded. I noticed many designs on the web have this pin labeled as reserved and not connected.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5739
Posted: 05:25pm 28 Apr 2022
Copy link to clipboard 
Print this post

Officially pin 4 is reserved i.e. not connected now. It used to be used, but no longer is. All I can say is that it's not caused a problem on any of the VGA circuits I've played with so far. :)  I'll get rid of it anyway.
Mick

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

Joined: 05/03/2018
Location: Netherlands
Posts: 3558
Posted: 09:04pm 28 Apr 2022
Copy link to clipboard 
Print this post

Hi Mick,

No comments on 1.4. You managed to cram an awfull lot of functionality onto the small board. 100% compliments.

Volhout

P.S. I am still looking for a few hours to look into the VGA pico audio. I simply didn't have time to analyze it. Been working 2 jobs currently so I am happy with 10 minutes each day to follow this thread. What is the PWM clock, how many bits is the PWM, etc.. so I can simulate low pass filter and see what matches best with this data, and what S/N can be achieved.
Is 1k/47nf (in peters and your design) perfect, or 220ohm/100nf (on some other designs). Or do we need a 2 stage low pass filter ? That are things I normally analyze and design around. It is true that PWM clock will not be audible, but will it distort in audio amplifiers, so it causes offsets or audio distortion.
PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5739
Posted: 09:17pm 28 Apr 2022
Copy link to clipboard 
Print this post

I don't know the details of the PWM, I suspect that only Peter could give you that information. A 2-stage filter would almost certainly be better, but how much better is something else. :)
Mick

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

Guru

Joined: 11/02/2018
Location: Australia
Posts: 1795
Posted: 10:43pm 28 Apr 2022
Copy link to clipboard 
Print this post

@Volhout
"It is true that PWM clock will not be audible, but will it distort in audio amplifiers, so it causes offsets or audio distortion."

It is possible to sidestep the issue of amplifier distortion by keeping it digital right to the end. I used mosfet drivers to amplify the PWM followed by LC filters and DC blocking capacitors then straight to the speakers.

"What is the PWM clock, how many bits is the PWM"
Linking audio out to FIN gives 44100Hz which is standard CD sample rate, therefore we may assume it is 16 bits as that is CD standard.

@Thwill
"The problem is to do with a lack of free physical sockets in my workspace area to plug into, whereas the multiway sockets I am already using also provide a total of 5 USB power sockets - alas these are proving to be subpar when it comes to delivering 5V. "

Can this unit be opened up?. If so maybe it can be repaired.
Trace the circuit to find the output sensing resistors and change the values to get 5.1V. If circuit tracing isn't your thing post photos of both sides of the PCB and I will try to work it out. If you can read the IC type number that would help.
Failing that you can replace the guts with with the guts of something that can deliver 5.1V.
Edited 2022-04-29 10:25 by phil99
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3558
Posted: 05:38am 29 Apr 2022
Copy link to clipboard 
Print this post

If the workbench has 5 USB sockets iT may also contain diodes to prevent back powering.
Even small hubs have these. You dan take them out if you know what youre doing.
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3558
Posted: 06:55am 29 Apr 2022
Copy link to clipboard 
Print this post

Looked at the audio, to analyze what it is doing.


option audio gp6,gp7


Generates a 44.1kHz squarewave PWM signal at GP6 and GP7. This could point to the fact that audio is running at 44.1kHz (CD wav sampling frequency).


play tone 1000,1000


Modulates the 44kHz square wave. But modulation varies between extreme low and extreme high dutycyces.


play volume 1,1


Minimizes the modulation (trigger scope at the rising edge of the square wave, zoom in at the falling edge of the square wave). When you put the scope in persisten mode, you will see that the modulation varies in steps of 8ns (this is a PWM clock of 125MHz ... that is far from accidental...)

The audio PWM resolution is 125000000 / 44100 = 2834 = 11.3 bits. Better than the old 8 bit computers. But definitely not CD quality (14-16 bits). Since I haven't seen the 44.1kZ reach the 100% and 0% duty cycle, I assume the 16 bit audio is converted to 11 bits (value >> 5) and then send to the PWM. That uses 2048 of the 2843 steps. So 11 bit resolution.

In my analysis I found indeed a lot of noise on the 44.1kHz waveforms. Some of it is bleeding in from the VGA signals (in Peters 1.4 VGA board the audio and video components are close to each other), but a lot of it is indeed power supply noise.
I am going to look into that later. First task is to look at the performance of the audio filter. I have worked on CD DAC filters before and these are quite tough to reach 20kHz with a Nyquist frequency of 22.05kHz. But since we are not achieveing CD quality anyway, we could also sacrifice some of the audio spectrum (my hearing doesn't  go above 14kHz anyway).
Edited 2022-04-29 17:02 by Volhout
PicomiteVGA PETSCII ROBOTS
 
     Page 12 of 31    
Print this page
© JAQ Software 2024