6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Mon Jun 03, 2024 7:50 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: 65C22 acting goofy...
PostPosted: Sun May 01, 2016 3:03 am 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1207
Location: Soddy-Daisy, TN USA
So, the good news is that I have successfully implemented a 65C22 to my L-Star. :-D

I have the VIA mapped to $4000+.

For those that don't know, the L-Star provides 16K of RAM and 8K of ROM to the 65C02.

Anyway, I wrote a little BASIC program to cycle through PORT A of the VIA.

Things are working great until I noticed some of the pins are backwards. I have checked and rechecked the datasheet but it appears that P3 and P2 are reversed as are P6 and P5. I cannot see where I've connected anything incorrectly. P0 goes to LED0, P1 to LED1, etc.

I initially ran the following code:

Code:
poke 16387, 255       -- PORT A output all pins
poke 16385, 170       -- %10101010


I connected all 8 pins of PORT A to some LED's but the pattern that's lit up is: %11000110

I've tried several examples:

%00001111 results in %00001111 (CORRECT)
%00000100 results in %00001000 (INCORRECT... P3 lit instead of P2)
%11111111 results in %11111111 (CORRECT)

Am I missing something?

For reference, I have A15 tied to CS2, A14 tied to CS1 and A3:0 tied to RS3:0

Thanks

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Sun May 01, 2016 3:31 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3363
Location: Ontario, Canada
cbmeeks wrote:
So, the good news is that I have successfully implemented a 65C22 to my L-Star. :-D
Good stuff! There's SO much that a VIA can do! (Versatile Interface Adapter, or VIA, is marketing-speak for 6522 :) )

cbmeeks wrote:
I cannot see where I've connected anything incorrectly. P0 goes to LED0, P1 to LED1, etc.
Did you also check that each of the VIA data-bus pins connects to the corresponding CPU data-bus pin? (ie, VIA d7 to CPU d7, VIA d6 to CPU d6 etc)

-- 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: Sun May 01, 2016 3:48 am 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1207
Location: Soddy-Daisy, TN USA
My old eyes aren't what they used to be.

That was it!

Ugh...totally missed that one. I hadn't noticed my wires were mixed up on the data bus side. LOL

Thanks!

Now it's time to have some fun!

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Sat May 07, 2016 11:24 pm 
Offline
User avatar

Joined: Thu Jun 23, 2011 2:12 am
Posts: 229
Location: Rancho Cucamonga, California
cbmeeks wrote:
So, the good news is that I have successfully implemented a 65C22 to my L-Star. :-D

I have the VIA mapped to $4000+.


I'm glad you got it to work!

Quote:
For those that don't know, the L-Star provides 16K of RAM and 8K of ROM to the 65C02.


Well... that's just a little bit inaccurate.

The Propeller on the L-Star can map up to 32K of memory (RAM and/or ROM) into the 65C02 address space, at any location, in up 8 blocks of consecutive addresses. But for most configurations, that's a bit optimistic because for any projects that do anything other than provide memory to the 65C02, the other functionality will take up some hub memory space.

For example, the Apple 1 emulator project provides 16K RAM and 8K ROM because the rest of the hub memory is used by the PIA emulator, the video generator and the drivers for the serial port and the PS/2 keyboard. But the KimStar project only provides (virtual) RAM to the MicroKim, so it's configured as 24KB (pre-initialized with MS Basic). I could probably be modified to present the full 32KB but I wanted to keep the code simple.

L-Star Plus has a 128KB SRAM chip that makes it unnecessary to worry about available memory in the Propeller. It just doesn't work yet because I haven't written a software module for it yet :)

===Jac


Top
 Profile  
Reply with quote  
PostPosted: Sun May 08, 2016 1:13 am 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1207
Location: Soddy-Daisy, TN USA
Ah, right you are. Sorry, I was going by the base config that I've been using. :-)

And yeah, let me know when L-Star Plus is ready!

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

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