6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 7:22 am

All times are UTC




Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Thu Aug 19, 2021 11:29 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
graeme.harker wrote:
floobydust wrote:
I'll make a few other observations...

1- What clock rate are you running the CPU at? I don't recall seeing it mentioned. Also, which CPU is it?

2- CA2... your ISR toggles it, but it's purpose is not described. Is it handshake to the external device?

3- Your ISR increments an index which is 8-bits. In short, after collecting 256 data inputs, you start overwriting your buffer space.

Finally, perhaps a schematic and picture of the setup you've built for this?


1) it's a WDC65C02S at 1MHz - nothing too crazy
2) CA2 is the OE# (output enable) of my downstream device
3) it's a standard circular "ring buffer" with read and write pointers (with a check to see if the buffer is nearly full) - pretty standard


Okay, so a quick look at your ISR, a couple things:

1- You're not managing your circular buffer head/tail pointer in the ISR, so you "could" get a buffer overflow.
2- A quick add on clock cycles, results in 55 clock cycles to execute. This limits your data transfer rate to about 18K per second (less all overhead in code elsewhere that runs to support this).

As there's more code running besides the ISR, you should examine how much over head it takes (in clock cycles) which will get you to how many transactions per second you can handle at 1MHz.

And the final question:

What is your maximum number of data transfers per second?

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 43 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: