Recently I have been writing my own greyscale routines for my TI-84 plus calculator and have been noticing some strange things. According to wikit on the article for port 10h it is stated that a minimum of 10 microseconds is required between LCD writes and reads, and this holds true on jsTIfied. But this seems to not be 100% accurate for my physical calculator, I am aware that on port 29h you can have it wait the time for you, but am under the impression that by writing $0C to port 29h you can disable this. On my physical calculator, the following code will draw 3 lines to the screen without the need for delay, despite not being supposed to work according to wikiti and not working in jsTIfied.



Code:
       ld a, #3 ; turbo cpu
       out (0x20), a

       LD     A, #0x0C ; reset lcd delay
       OUT    (0x29), A

 
       LD     A, #0x80  ; set row
       OUT    (0x10), A
      

       LD     A, #0x20          ; reset col
       OUT    (0x10), A

       ld a, #0xFF   ; 3 quick lines
       out (0x11), a
       out (0x11), a
       out (0x11), a


From all that I have read, I would assume that this shouldn't work, but for some reason it does. I have 2 theories on why this might be. One, my calculator is newer and may not require delay (least likely). Two, I have completely misunderstood port 29h (most likely). If anybody has any ideas I would love the hear them.


And if it helps I have been seemingly experiencing longer than expected wait times from my greyscale routines than on jsTIfied, but this might be down to a million other reasons and might not be related to this problem.

Edit: Same effect occurs when port 20h is 0
It sounds like your calculator may have a Novatek driver which responds much faster than a T6A04.
Thank you for the information, looking at the page I think I might actually have the "New Kinpo LCD Driver" because I was seeing some strange scrambling of the display when using the status port. In retrospect that seems especially strange, as I don't need any delay between lcd writes and the status port for lcd delay was causing issues.

Wonder what is the best method for compatibility with other calculator models, if I leave the lcd delay it just seems wasteful, but should be compatible with all models. The status port just scrambles my screen. Think I'll just use 60 t-states between writes so I can still use jsTIfied.
If you want maximum compatibility you should ensure your delay is always at least 10 microseconds without polling the status register. You could refer to what Doors CS 7.4 does for convenience: at a glance I think it always sets the CPU to 6 MHz and does cycle counting.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
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 vote in polls in this forum

 

Advertisement