Jump to content
Sign in to follow this  
ijor

Pokey delayed serial input capture

Recommended Posts

As Hias commented in other thread, Pokey doesn't capture the serial input at the optimum cycle. Ideally serial data should be captured at the middle of the bit cell. This allows for the maximum possible deviation between the rate transmitted by the peripheral and Pokey internal one. But Pokey instead performs the capture between 4.5 and 5 cycles later, depending on the phase of the serial input and the internal clock. This is not a big problem for the normal bit rates, but it is critical for the very high ones such as when using divisor 0.


Here it is a simulation waveform illustrating the worst case issue with divisor zero. The simulation is based on the original Pokey logic taken from my reverse engineered schematics:

 

PokeyLateSerinLatch.thumb.jpg.74b90b8c90cdd2b2591a955fbf55ef16.jpg

 

The signals are the main clock, the external serial input in red, the internal synchronized serial input in yellow, and the first bit of the internal shift register in light blue. The counter at the top is a virtual counter that counts cycles since the internal serial input edge (this counter doesn't exist at the hardware).


The first vertical cursor, at the start of cycle #7, marks the center of the bit cell and is the ideal capture point. The period with divisor zero is 14 cycles. The second cursor at the start of cycle 12 shows when the bit is actually latched at the shift register, five cycles after the center of the cell. This five cycles, or four and a half, delay is constant regardless the divisor.

 

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...