6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Apr 27, 2024 12:37 pm

All times are UTC




Post new topic Reply to topic  [ 117 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8  Next
Author Message
PostPosted: Sat Nov 25, 2023 4:55 pm 
Offline
User avatar

Joined: Mon Mar 06, 2023 9:26 am
Posts: 84
Location: UK
Yet more progress! The monitor can now read intel hex records over the serial connection and verify the checksum. Combined with a "j" command that simply jumps to a location in memory, I can now theoretically load and run programs over serial.

_________________
probably the youngest person on this forum


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 25, 2023 6:20 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1398
Location: Scotland
allisonlastname wrote:
Yet more progress! The monitor can now read intel hex records over the serial connection and verify the checksum. Combined with a "j" command that simply jumps to a location in memory, I can now theoretically load and run programs over serial.


Excellent... Now, I have this TinyBasic you might want to play with ;-)

Cheers,

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 25, 2023 7:14 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8144
Location: Midwestern USA
allisonlastname wrote:
The monitor can now read intel hex records over the serial connection and verify the checksum.

Blasphemy!!!  People have been burned at the stake for allowing Intel cruft to infiltrate 6502 machines. :D

Seriously, glad to see you are making good progress with this.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 26, 2023 4:35 am 
Offline

Joined: Sat Oct 28, 2023 7:57 pm
Posts: 15
Location: Missouri
Dr Jefyll wrote:
Quote:
"65 02" in hex
Hm, but shouldn't it be "02 65"?

(Little Endian! :mrgreen: )

-- Jeff


You are technically correct. The best kind of correct.


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 26, 2023 9:57 am 
Offline
User avatar

Joined: Mon Mar 06, 2023 9:26 am
Posts: 84
Location: UK
BigDumbDinosaur wrote:
Seriously, glad to see you are making good progress with this.


It's happened surprisingly quickly - I expected writing the monitor to take hours and hours of debugging and poring over hex dumps, but it was pretty painless. In fact, the biggest error I found was with the code running on the AVR, not the 6502.

I'm not fully decided on where to go next - I might write a forth, while following along to https://colorforth.github.io/POL.htm.

_________________
probably the youngest person on this forum


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 26, 2023 3:08 pm 
Offline
User avatar

Joined: Mon Mar 06, 2023 9:26 am
Posts: 84
Location: UK
I'd also like to change how the monitor works a little - as is, it runs at about 8khz at full speed, which... isn't great. Unfortunately, with my current setup, I can't run the clock any faster (say, by using the AVR's timer to output a square wave on a pin) because I need to check the bus every cycle to perform serial operations. I can deal with it for now, but I'd like to have a proper freestanding UART at some point.

_________________
probably the youngest person on this forum


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 26, 2023 5:21 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8144
Location: Midwestern USA
allisonlastname wrote:
Unfortunately, with my current setup, I can't run the clock any faster (say, by using the AVR's timer to output a square wave on a pin) because I need to check the bus every cycle to perform serial operations. I can deal with it for now, but I'd like to have a proper freestanding UART at some point.

As I’ve often said when someone tries to do roll-your-own TIA-232 communication, there is a reason UARTs were invented.  :D

BTW, you might want to look at the AVR’s data sheet before using it as a clock source.  WDC MPUs’ clock requirements demand a full CMOS signal with a rise/fall time not to exceed 5ns.  While you can fudge that to some extent, it becomes a question of how stable do you want it.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 26, 2023 11:24 pm 
Offline
User avatar

Joined: Mon Mar 06, 2023 9:26 am
Posts: 84
Location: UK
Looks like my earlier maths was completely off, because I just doubled the AVR's clock speed (from 4mhz to 8mhz) and now it's clocking the 6502 at about 330khz. That's a much more acceptable speed, so I think I'll leave the monitor as it is for a while.

_________________
probably the youngest person on this forum


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 26, 2023 11:29 pm 
Offline
User avatar

Joined: Mon Mar 06, 2023 9:26 am
Posts: 84
Location: UK
No, I was just being stupid and forgot to reset the monitor before testing the speed. It seems closer to 60khz, which is still way better than 8.

And if I remove some unnecessary sleeps in the code, I can get it all the way up to 100khz. Result!

_________________
probably the youngest person on this forum


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 28, 2023 12:44 am 
Offline
User avatar

Joined: Mon Mar 06, 2023 9:26 am
Posts: 84
Location: UK
I think my next goal will be talking to a character LCD I have (HD44780, of course). I'm currently thinking of using the 4-bit interface to save on IO pins.

_________________
probably the youngest person on this forum


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 28, 2023 1:24 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8428
Location: Southern California
allisonlastname wrote:
I think my next goal will be talking to a character LCD I have (HD44780, of course). I'm currently thinking of using the 4-bit interface to save on IO pins.

See the sample LCD driver code at http://wilsonminesco.com/6502primer/LCDcode.asm in several forms, including for the 4-bit interface, linked in the 6502 primer.

_________________
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: Tue Nov 28, 2023 1:55 am 
Offline
User avatar

Joined: Fri Feb 17, 2023 11:59 pm
Posts: 163
Location: Lviv, Ukraine
allisonlastname wrote:
I think my next goal will be talking to a character LCD I have (HD44780, of course). I'm currently thinking of using the 4-bit interface to save on IO pins.

FYI - there are some really nice T6963C-based displays as well (most modern versions come with UCI6963, which is compatible with T6963C). You might need to cut some jumpers though to select a proper font, those are usually marked on display's PCB.
They have built-in fonts, graphic mode, come in sizes up to 240x128 (40*16 chars) and work at up to 5 MHz (5 times faster than HD44780). This allows them to be put directly on CPU bus without having to bit-bang (alternatively, you can use clock stretching circuits for slow LCDs - there have been some recent posts on this topic by gfoot, Jeff & myself over the past month). My Deck65 SBC uses one (240*64, 40*8 chars).

_________________
/Andrew

deck65 - 6502 slab with screen and keyboard | ПК-88 - SBC based on KM1810VM88 (Ukrainian i8088 clone) | leo80 - simple Z80 SBC
nice65 - 6502 assembly linter | My parts, footprints & 3D models for KiCad/FreeCAD


Last edited by and3rson on Tue Nov 28, 2023 8:10 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 28, 2023 5:49 pm 
Offline
User avatar

Joined: Mon Mar 06, 2023 9:26 am
Posts: 84
Location: UK
Looking at it, I might just put it on the bus and use it in 8 bit mode. I only have one VIA, and port B is already reserved for SPI data in.

However I do it, physically connecting it will be very awkward, because the module I have just has an 8*2 pin header on, which I'm connecting to by jamming jumper wires into the other end of a ribbon cable. Some day I'll make a proper breakout for it, but today is not that day.

_________________
probably the youngest person on this forum


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 29, 2023 1:02 am 
Offline
User avatar

Joined: Mon Mar 06, 2023 9:26 am
Posts: 84
Location: UK
And now the RAM has somehow exploded. This basically kills the computer because (as already mentioned earlier in the thread) the 62256s I have don't play nicely with the 6502 for whatever reason, and the 43256 worked for some reason.

_________________
probably the youngest person on this forum


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 29, 2023 2:49 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8428
Location: Southern California
allisonlastname, without digging back through earlier posts of yours, I don't remember if you've been through the 6502 primer.  It shows using a 62256 SRAM and also how you can multiplex pins on the 6522 for putting loads of things on a single 6522.

_________________
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  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 117 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8  Next

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 14 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: