6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 9:00 am

All times are UTC




Post new topic Reply to topic  [ 142 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 10  Next
Author Message
PostPosted: Fri Jun 19, 2020 3:04 pm 
Offline

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 344
Well... Reorganized the board. Put away the big switch away so I will power the board just with USB by now.

Attachment:
photo_2020-06-19_15-55-30.jpg
photo_2020-06-19_15-55-30.jpg [ 213.81 KiB | Viewed 1216 times ]


Removed CLK fixed capacitors and rewired the circuit to a 14 dip socket where I can put in and pull off variable capacitors, so I don't need to desolder and resolder them just to change the trimmer and measure it.

By doing this, I got the board working at 3.3V stable so I can move to the next thing that is putting the EEPROM socket.

I will follow the w65c265SXB schematics, that uses a NAND logic gate to accomplish that.

Attachment:
image.png
image.png [ 33.61 KiB | Viewed 1216 times ]

Attachment:
Image from iOS.jpg
Image from iOS.jpg [ 502.29 KiB | Viewed 1216 times ]


Top
 Profile  
Reply with quote  
PostPosted: Sun Jun 21, 2020 7:18 pm 
Offline

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 344
REQUEST FOR HELP:

  • I've started my project while having 0 / zero / none knowledge of 65xx assembler.
  • I've been able to assemble a clone of the w65c265qbx (mensch microcomputer) by following schematics.
  • It does boot as you have seen.

But no matter what I do, I can't get it to run code. I'm sure I'm doing something wrong, but can't figure what.

The set date and time functions do work. The (F)ILL command does work. I also can use the (M) command to directly type bytes in memory locations so I can write a program to memory. But when I use the (G) or (J) commands, the board would freeze, and I have to reset.

Then, I use the (D)isplay command, and the bytes of the program that I wrote are still there.

Could please anyone. To provide a simple listing of ML code (a bytes listing, actually) that I could type from memory location $00:00C0, so I can actually test that the MCU is working as expected?

Thanks.


Top
 Profile  
Reply with quote  
PostPosted: Sun Jun 21, 2020 10:12 pm 
Offline
User avatar

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
tokafondo wrote:
REQUEST FOR HELP:

  • I've started my project while having 0 / zero / none knowledge of 65xx assembler.
  • I've been able to assemble a clone of the w65c265qbx (mensch microcomputer) by following schematics.
  • It does boot as you have seen.

But no matter what I do, I can't get it to run code. I'm sure I'm doing something wrong, but can't figure what.

The set date and time functions do work. The (F)ILL command does work. I also can use the (M) command to directly type bytes in memory locations so I can write a program to memory. But when I use the (G) or (J) commands, the board would freeze, and I have to reset.

Then, I use the (D)isplay command, and the bytes of the program that I wrote are still there.

Could please anyone. To provide a simple listing of ML code (a bytes listing, actually) that I could type from memory location $00:00C0, so I can actually test that the MCU is working as expected?

Thanks.


Try with someone really simple like LDA #$12; BRK (A9 12 00). The BRK should reenter the monitor and show the registers. A should be $12.

_________________
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 22, 2020 12:55 am 
Offline

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 344
Thank you very much. By some reason, the code didn't work until I set the capacitance up to 27pf... I've observed in the logic probe logs that the fast clock sometimes ticked at 6 Mhz instead of 4,9152 Mhz.

Now it seems to be stable, and I could write this:

Code:
00:00C0 18         CLC             ; CLEAR CARRY FLAG
00:00C1 FB         XCE             ; SET NATIVE MODE (BY XCHANGING CARRY FLAG WITH EMULATION MODE FLAG)
00:00C2 C2 10      SEP             ; SETS 8 BIT INDEX REGISTERS IN NATIVE MODE
00:00C4 A9 00      LDA $#00        ; THOSE TWO LOADS THE BANK (A REGISTER)...
00:00C6 A2 D0 00   LDX $#00D0      ; ...AND OFFSET (X REGISTER) FOR THE NEXT SUBROUTINE TO WORK
00:00C9 20 4E E0   JSR $E04E       ; JUMPS TO SUBROUTINE THAT OUTPUTS TO SERIAL PORT 3 WHAT FINDS IN THE ADDRESSES
                                   ; THE REGISTERS PREVIOUSLY LOADED POINTS TO, UNTIL IT FINDS NULL CHAR
00:00CC 60         RTS             ; RETURN TO MONITOR
00:00CD 00 00 00   BRK BRK BRK     
00:00D0 0D 0D 0D 48 45 4C 4C 4F 2C ; ASCII STRING DATA FOR THE SUBROUTINE TO SHOW:
00:00D9 20 57 4F 52 4C 44 21 00 00 ; <CR><CR><CR>HELLO, WORLD!


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 22, 2020 4:02 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Glad you're getting along a bit, but the continuing comments about touchy oscillator capacitors are baffling and worrisome. Something's wrong -- it's not normal to be fine-tuning those guys all the time (or at all, really). Hard to say for certain, but I suspect your power and Vcc arrangements are responsible for the flakiness. It'll be time well spent and I think you'll spare yourself some grief if you give the matter some attention.

In the photo I see some of your wires are short and direct and others have lots of unnecessary slack. If it were my project I'd re-do the bottom half entirely, especially since those wires are what bring Vcc and ground to the chip. Also I'd extend those Vcc and ground connections one step further so they form a complete loop around the chip. IOW, don't just go from the other circuitry to N-E-S-W (a J shape) around the chip. Make it N-E-S-W-N to complete the loop. Better yet, you could create an + shape right in the center of the chip's footprint connecting directly to all points of the compass. For best results you might wanna clear away what's there and re-do those N-E-S-W connections entirely. Then make sure the connections from the oscillator caps to the loop or + and to the CPU pins are reasonably short and straight. Best if those caps are rather close to the chip.

In another post I was asking about the bypass capacitors, and while I have no quarrel with recycled parts it's still important to get the right sort of device. Is there any old digital/computer gear you can cannabalize to get some ceramic caps? These'll be a better choice than the audio caps you have in there now.

Have fun and keep us posted,

Jeff


Attachments:
photo_mod1.jpg
photo_mod1.jpg [ 95.98 KiB | Viewed 1205 times ]

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 22, 2020 10:05 am 
Offline

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 344
Thanks for your detailed answer and honest advices. They are priceless.

This is the test board. The one built to see if I could do it. I have another one where I will be organizing things the best way.

So, you are telling me that I could wire the power supply like this, aren't you?

Code:
+-----+-----+
+     |     +
+     |     +
+-----+-----+
+     |     +
+     |     +
+-----+-----+


If it is... Where should I be attacking the mesh with the source of power? to the center? to one of the edges? to one of NSEW points?

The clock seems stable now, not only because the thing runs code, but also because I set date and time and after all night powered on, I checked back in the morning and the board hasn't frozen and it's still on time.

As the clocks, I think I will be putting cans there in more advanced stages of the project. The graphics chip I chose runs anywere between 1 and 33mhz, and I intend to run the board all from the same clock (except for 32768hz), I'm surely reworking that part. I still have to figure out how the clock affects the graphic chip. I think it has something to do with the fact that it has an integrated LCD driver, and that could be the key to choose the right frequency. From there, it would be a matter of extracting FCLK for the '265.

Thanks, again. I'm thinking in a kind of burning test code that I could write in the few bytes of RAM that the '265 has internal, to let it run for hours.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 22, 2020 2:38 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
tokafondo wrote:
Where should I be attacking the mesh with the source of power? to the center? to one of the edges? to one of NSEW points?

Yes, a mesh or grid is the right idea. And you want as many connections as possible, in all directions... subject to practical limitations, of course.

The ideal would be a Ground Plane, and that would directly attach every point with every other point! But it's possible to imagine the plane as an infinitely fine mesh. That's our compromise solution -- a "plane" whose mesh is more coarse than the ideal. A power or Vcc plane is the same.

You'll find it challenging to implement both a ground grid and a power grid, but doing just one or the other (for example, only do a ground grid) is a reasonable compromise. This works because attaching to a bypass cap that goes to the ground grid is almost as good as attaching to a power grid.

Remember to locate the crystal and the associated oscillator caps close to the '265, and keep the connections short. And I expect you'll be able to go back to the capacitance value shown in WDC's schematic.

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 22, 2020 2:53 pm 
Offline

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 344
Dr Jefyll wrote:
tokafondo wrote:
Where should I be attacking the mesh with the source of power? to the center? to one of the edges? to one of NSEW points?

Yes, a mesh or grid is the right idea. And you want as many connections as possible, in all directions... subject to practical limitations, of course.


What do you think of this arrangment?
Code:
    +
   /|\
  / | \
 /  |  \
+---+---+
 \  |  /
  \ | /
   \|/
    +


I was thinking of using twisted pair CAT5 ethernet cable, the rigid one, like the one in the previous pictures, but this time the shortest possible route, with the GND and VDD twisted in each other instead of apart.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 22, 2020 4:04 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
tokafondo wrote:
What do you think of this arrangment?
That looks good -- it agrees with the principle of as many connections as possible, in all directions. Possibly you don't need both the diamond and the cross, but the extra effort is trivial, so I'd say go for it. Better to invest a few extra minutes doing something boring, as compared to wasting many "interesting" hours chasing gremlins.

Speaking of effort, I think you'll find it much easier to work with fine gauge wire, such as AWG 30 wire-wrap wire. That and other relevant topics are mentioned in my and Garth's posts here. As he says, resistance is not the enemy (meaning a thicker conductor isn't greatly helpful).

No need to twist Gnd and Vcc together -- simply being adjacent is almost the same thing. And a run of Gnd and Vcc would typically be shunted at each end by a bypass cap anyway, which makes the situation less critical. Remember, for the high frequencies we're worried about a bypass cap acts pretty much as a piece of wire. That's why in my previous post I remarked that attaching to a bypass cap that goes to a ground grid is almost as good as attaching to a power grid. Hence you may choose to omit the power grid per se. Instead it's okay to rely on bypass caps and the Gnd grid, and for Vcc distribution just have a fairly casual arrangement of wires, not a grid.

For gnd connections I often use uninsulated wire, and that works out well because it's less work to install -- I usually just solder it flat on the board. And of course there's quite a lot of wiring in the ground grid, so the effort saved is considerable. In contrast, my Vcc distribution is usually pretty minimal, using insulated wire.

-- Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 22, 2020 8:17 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
Dr Jefyll wrote:
As he says, resistance is not the enemy (meaning a thicker conductor isn't greatly helpful).

Also, increasing wire size has surprisingly little effect on inductance.

Quote:
Remember, for the high frequencies we're worried about a bypass cap acts pretty much as a piece of wire.

And remember that even a straight piece of wire has inductance, meaning you'll want to keep the capacitors' lead length as short as practical. (Oh how I wish the pin-out standardizers of over five decades ago had anticipated the increasing slew rates, and put the power and ground pins at the middle of the ICs' bodies, instead of out at opposite corners!)

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 22, 2020 8:36 pm 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
What's more important than keeping the power and ground wires together, is keeping the data lines and ground together. Every transition on a data line involves a small pulse of current which needs a return path, and the smaller the loop described by the outward and return paths, the less inductance, bounce, ringing and crosstalk you'll have to deal with.

So use your data paths as a guide to where to run your ground network. And fit 100nF ceramic capacitors across every IC's power pins. That'll take care of most of your immediate needs.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 22, 2020 10:29 pm 
Offline

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 344
Thanks all, again.

Well, I don't know if what I've done has in fact worsened my circuit, but here it is:

Attachment:
photo_2020-06-22_23-23-48.jpg
photo_2020-06-22_23-23-48.jpg [ 243.71 KiB | Viewed 1088 times ]


I took all the pins of IDE ports of an old Pentium 4 motherboard and soldered them along the small pins of the PLCC adapter the '265s was into.

Attachment:
photo_2020-06-22_23-23-53.jpg
photo_2020-06-22_23-23-53.jpg [ 251.54 KiB | Viewed 1088 times ]


And I'm reworking all as you suggested. I'll try to get a wire wrapper so I can do the next connections that way. I will remove and place back the clock circuits, next to the '265s. And I will also put a small FTDI board I ordered, so I will have a fixed serial converter there.

A thing about the FTDI is that it has an internal oscillator that could be used to clock the '265s, couldn't it??


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 22, 2020 11:49 pm 
Offline

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 344
I will stop today here:

Attachment:
photo_2020-06-23_00-46-21.jpg
photo_2020-06-23_00-46-21.jpg [ 196.79 KiB | Viewed 1083 times ]


Attachment:
photo_2020-06-23_00-46-24.jpg
photo_2020-06-23_00-46-24.jpg [ 232.04 KiB | Viewed 1083 times ]


I don't know if having VDD in one side and VSS in the opposite one, will make things better or worse. Maybe it will make putting clock, reset or serial circuits more difficult to replace...


Top
 Profile  
Reply with quote  
PostPosted: Tue Jun 23, 2020 11:59 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
That's looking a lot better. But I hope you get some wire-wrap wire or other fine gauge wire soon, because I think you'll find it easier to work with.

It's OK to solder wire-wrap wire, BTW. Stripping off the insulation can be tricky, but you'll figure it out. When you buy a spool of WW wire there's usually a little stripping tool in the housing for the spool. Sometimes I use the tip of a hot soldering iron instead -- I just melt a nick in the insulation then pull it off with my fingernails or whatever.

In the photo, the arrow suggests (approximately) where you could attach the oscillator capacitors. I would relocate them so they're right next to the '265, ideally with one lead of each cap going directly (no intervening connection) to the appropriate pin on the '265.

And I'll bet you can use the values stated on the schematic -- no need for variable caps. Good luck!


Attachments:
photo_mod 2.jpg
photo_mod 2.jpg [ 28.75 KiB | Viewed 1109 times ]

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 27, 2020 2:36 am 
Offline

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 344
UPDATE:

AS suggested, I reworked the entire board. Well... the '265 is still in the same place. =D =D =D

I put a fixed FT232RL based daughter board to both power the board and interface the CPU. It seems that I could Fclock the CPU with it, because it can output a 6 Mhz clock in one of its pins, removing the need of a second crystal chip in the board. I have yet to test that way.
Attachment:
20200627_025942_HDR.png
20200627_025942_HDR.png [ 4.67 MiB | Viewed 1023 times ]



The bottom has now the capacitors under the main chip, and also the BE resistor directly soldered to the BE pin. I used a cross shape for the VDD supply, and a square shape for the VSS supply. I'm pretty sure this can be improved and in fact I will have to do it because...
Attachment:
20200627_025951_HDR.png
20200627_025951_HDR.png [ 5.09 MiB | Viewed 1023 times ]



...I have to yet fit all of this in the main board. There are even things yet to consider like a sound chip, the connector for the LCD module, an extra connector for the buttons and an extra board that would be used to put the LCD module and the buttons themselves. But this is more or less the things that should be put there.
Attachment:
20200627_030656_HDR.png
20200627_030656_HDR.png [ 5.48 MiB | Viewed 1023 times ]


Of course that this is not the definitive arrangement and I'm pretty sure I'll have to get all those caps, resistors and crystals moved, surely on top of the main chip.

And anyway, if someday this becomes something that would be actually manufactured and/or sold (I think it would be the first true 65xx games console in years, since the Atari Lynx) I would need the aid of true and experienced hardware designers to get a more compact design with surely SMD parts.

Did I mention that I have to learn 6502 programming to get this to do something??


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 142 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 10  Next

All times are UTC


Who is online

Users browsing this forum: Google [Bot], Martin A and 41 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: