ts-7000
[Top] [All Lists]

[ts-7000] EP9302 Instruction set timings

To: ts-7000 <>
Subject: [ts-7000] EP9302 Instruction set timings
From: Kevin Cozens <>
Date: Fri, 14 Sep 2007 20:53:29 -0400
Greetings.

I am using a TS-7250 that has a 44780 based LCD controller attached in 4-bit
mode. I have the display working but I am using fixed delays. Due to hardware
issues I was not able to read from the LCD so I had to use the maximum delay
times to allow writes to the display to complete before writing the next
data/command to the display.

When a second prototype system was built it used an LCD from a different 
manufacturer. Some delay values had to be increased for the software to talk 
to the new display. I have some wiring changes that will allow me to read from 
the LCD so I can check its busy flag. Now I need to change the software.

I was using usleep(t) but that doesn't seem to provide me fine enough control 
in the timing of changes to the EN line. The sample lcdmesg.c file in the 
files section of this mailing list used the following for delays:

#define COUNTDOWN(x)    asm volatile ( \
   "1:\n"\
   "subs %1, %1, #1;\n"\
   "bne 1b;\n"\
   : "=r" ((x)) : "r" ((x)) \
);

I don't want to blindly copy. I want to be able to calculate the values of x I 
need to give me various specific delays. I want to fill in values in the 
formula "cycles = x*op1 + (x-1)*op2t + op2n".

where:
   x is the number specified between brackets when COUNTDOWN is invoked
   op1 is the number of clock cycles needed for execution of 'subs'
   op2t is the number of clock cycles needed when the branch is taken to 1:
   op2n is the number of clock cycles needed when the branch is not taken
   cycles is the total number of cycles taken for a given value of 'x'

To do this, I need the instruction cycle times but I haven't found a document 
on the Cirrus Logic web site that covers the low level instruction set of the 
EP9302 chip. In particular, I need one that provides execution time (in clock 
cycles) of the CPU instructions.

Does anyone have a pointer to such a document or happen to know the execution 
cycle times of the instructions used in the above macro?

BTW, I am assuming the line containing =r is just something needed by the 
assembler to specify an addressing mode rather than an additional instruction.

-- 
Cheers!

Kevin.

http://www.ve3syb.ca/           |"What are we going to do today, Borg?"
Owner of Elecraft K2 #2172      |"Same thing we always do, Pinkutus:
                                 |  Try to assimilate the world!"
#include <disclaimer/favourite> |              -Pinkutus & the Borg



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU