View previous topic :: View next topic |
Author |
Message |
Snowblind Guest
|
Instruction cycle time |
Posted: Mon Nov 26, 2001 1:20 pm |
|
|
<font face="Courier New" size=-1>At 4mhz on a 16c84 the Instruction time is what?
I think its 4us, but im not sure.
Can you show me how you came up with the number?
Using the 2465.c driver how long would it take to read a byte from that device?</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 1325 |
|
|
Eugene Guest
|
Re: Instruction cycle time |
Posted: Mon Nov 26, 2001 2:30 pm |
|
|
I don't know if the 16c84 is the same as the 16c74 but if it is then here is the calcualation
1/[4 000 000(xtl speed)/4(osc per instructions)]
so you get 1ns
:=<font face="Courier New" size=-1>At 4mhz on a 16c84 the Instruction time is what?
:=
:=I think its 4us, but im not sure.
:=
:=Can you show me how you came up with the number?
:=
:=Using the 2465.c driver how long would it take to read a byte from that device?</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 1328 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
Re: Instruction cycle time |
Posted: Mon Nov 26, 2001 2:59 pm |
|
|
:=At 4mhz on a 16c84 the Instruction time is what?
:=I think its 4us, but im not sure.
:=Can you show me how you came up with the number?
:=Using the 2465.c driver how long would it take to read a byte from that device?
Microchip does not list the 16c84 on their web site anymore.
But you can find the data sheet archived on a few web sites if
you search the net.
But, if you look in the 16F84a data sheet, in the section
called "Instruction Set Summary", it has a paragraph that
explains it all.
To measure the time to read a byte using the 2465.c driver,
I would use a logic analyzer to capture the waveform. Or, you
could use an oscilloscope.
The 16c84 or F84 can't do hardware i2c. You have to use
the CCS software i2c library. But at slow clock speeds like
4 MHz, the CCS code can't run at 100 KHz. It runs at approximately 40 KHz. That's 25 usec per bit. You could
look at the data sheet for the 2465, and see how many i2c
bit-times that it takes to do a read operation. Then compare
their diagram to the CCS code in 2465.c to make sure that
CCS does it the same way. Then multiply the number of bit-times
by 24 usec to get the total.
But Microchip doesn't admit that they even make the 2465,
(or once made it) if you look on their web page.
___________________________
This message was ported from CCS's old forum
Original Post ID: 1329 |
|
|
Sherpa Doug Guest
|
Re: Instruction cycle time |
Posted: Mon Nov 26, 2001 4:16 pm |
|
|
:=I don't know if the 16c84 is the same as the 16c74 but if it is then here is the calcualation
:=
:=1/[4 000 000(xtl speed)/4(osc per instructions)]
:=so you get 1ns
Make that 1 microsecond!
:=:=Using the 2465.c driver how long would it take to read a byte from that device?
You COULD count all the instructions needed to do a read, but the other suggestions from PCM programmer are much better.
___________________________
This message was ported from CCS's old forum
Original Post ID: 1330 |
|
|
Snowblind Guest
|
Re: Instruction cycle time |
Posted: Mon Nov 26, 2001 6:36 pm |
|
|
:=You COULD count all the instructions needed to do a read, but :=the other suggestions from PCM programmer are much better.
Well I wish I had a oscilloscope, any of you have one you reccommend for someone doing this as a hobby
btw, thanks for all the replys everyone
___________________________
This message was ported from CCS's old forum
Original Post ID: 1332 |
|
|
Sherpa Doug Guest
|
Re: Instruction cycle time |
Posted: Wed Nov 28, 2001 7:56 am |
|
|
You could write a test program that does 1000 reads and toggles an LED. Then use a stopwatch to get the timing.
It is hard without the proper tools.
Sherpa Doug
:=:=You COULD count all the instructions needed to do a read, but :=the other suggestions from PCM programmer are much better.
:=
:=Well I wish I had a oscilloscope, any of you have one you reccommend for someone doing this as a hobby
:=
:=
:=btw, thanks for all the replys everyone
___________________________
This message was ported from CCS's old forum
Original Post ID: 1350 |
|
|
|