What is software SPI speed for various OSC speeds?


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,695


    Did you find this post helpful? Yes | No

    Default Re: What is software SPI speed for various OSC speeds?

    If you're trying to film it actually displaying all values between 0 and 9999 in 200ms then I don't think that's going to happen, no matter how fast you shift out the data.
    Nice camera 50000 frames / sec

    my tm1637 code can load the 4 digits in just under 50uS [40bits] on pic18@64mhz /16mhz mssp spi clock, you could could not maintain that rate for a 0-9999 count that would have its own overheads to add in. as henrik pointed out the multiplexing would be the limiting factor there too i think.
    Warning I'm not a teacher

  2. #2
    Join Date
    Feb 2013
    Posts
    1,156


    Did you find this post helpful? Yes | No

    Default Re: What is software SPI speed for various OSC speeds?

    Well, MAX7219 datasheet says 10mhz clock, that is way faster than 50khz, so I guess, since it supports that, this means it can also display with that speed, right?

    Regarding the current project, considering relatively low number of pins needed to drive 4 digits (28 pins) without any multiplexing or whatever, I think, it'll be better, if I control segments directly from MCU. As I have calculated, 1 port high/low or latch high/low with 4mhz clock, is possible at 1mhz frequency. Say I have to update altogether, this means it will be 28 times slower, about 35khz, which is 35000 fps. So if I up clock to 8mhz, I can do 50khz, with some overhead for counter code and so on.

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: What is software SPI speed for various OSC speeds?

    Well, MAX7219 datasheet says 10mhz clock, that is way faster than 50khz, so I guess, since it supports that, this means it can also display with that speed, right?
    No, why do you think that? All it means is that the chip can load the information about what it should display at that rate, it takes a lot longer for it to actually "render" the information on the display.

    From the datasheet:
    The scan-limit register sets how many digits are displayed, from 1 to 8. They are displayed in a multiplexed manner with a typical display scan rate of 800Hz with 8 digits displayed.
    If fewer digits are displayed, the scan rate is 8fOSC/N, where N is the number of digits scanned.
    So with 4 digits in use the display is updated at a rate of 8*800/4=1600 times per second.

    If you really do need the display to update 50000 times/second I'd suggest to use some latching driver chips (BCD to 7-segement or just plain old latches). The HEF4543 would be a good candiate I think.
    If you drive the digits directly with the PIC you need write to 4 different output/latch registers sequentially so there's a slight risk it will actually show up on camera since the four digits won't actially update at the same time. Like when going from 0099 to 0100 it MIGHT show up on camera like 0099, 0090, 0100 etc depending on the order in which you update the digits. If you use external latches you can preset the data and then latch it in all at once - bam.

  4. #4
    Join Date
    Feb 2013
    Posts
    1,156


    Did you find this post helpful? Yes | No

    Default Re: What is software SPI speed for various OSC speeds?

    Thanks, I was thinking about that, but just with external transistor, which will drive common pin for 7 segment....

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,695


    Did you find this post helpful? Yes | No

    Default Re: What is software SPI speed for various OSC speeds?

    So if I up clock to 8mhz, I can do 50khz, with some overhead for counter code and so on.
    1k if you're lucky imo
    Warning I'm not a teacher

  6. #6
    Join Date
    Feb 2013
    Posts
    1,156


    Did you find this post helpful? Yes | No

    Default Re: What is software SPI speed for various OSC speeds?

    Tried some lower speeds with MAX7219 and scan rate definitely causes issues - the moment digits are just going off being registered by high speed camera, so it is hard to guess what is displayed right now. Already noticeable at 5000fps.

Similar Threads

  1. SPI Commands Operating Speed
    By gunayburak in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 4th December 2016, 01:56
  2. 12F683, 12LF1840 - Port ON/OFF speeds are different!
    By CuriousOne in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 4th February 2015, 15:35
  3. Software based SPI For use on Nordic NRF24L01
    By longpole001 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 29th April 2012, 02:49
  4. Pulsin ir receiver and osc speeds
    By jimseng in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 24th March 2012, 20:12
  5. Replies: 4
    Last Post: - 16th May 2008, 15:35

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts