SPI basics


Closed Thread
Results 1 to 22 of 22

Thread: SPI basics

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    952


    Did you find this post helpful? Yes | No

    Default Basics, please....just basics

    Hi Darrel,

    I have several displays that support either parallel or SPI interfacing.

    Since I currently use this display (see picture) in 4/8 bits mode (datasheet is here http://www.lcd-module.de/eng/pdf/doma/dog-me.pdf), I think I get the best chance to learn how to get it to work via SPI.

    But let's stick on basics, please.

    What is SPI all about? What do I need to know to use SPI? What are the minimum requirements to make it work? So many questions....
    Attached Images Attached Images  
    Roger

  2. #2
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    704


    Did you find this post helpful? Yes | No

    Default

    Flotulopex,

    Look at the ST7036 LCD controller datasheet

    http://www.lcd-module.de/eng/pdf/zubehoer/st7036.pdf

    In page 47 you will find the timming sequence for a 4-wire SPI interface, which is what you need.

    Robert

  3. #3
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    971


    Did you find this post helpful? Yes | No

    Default

    Flotulopex / Sayzer

    I wonder if this what you are looking for. SPI is basically a synchronous way of transferring data between a MCU and peripherals.

    If you understand asynchronous serial transmission, synchronous is just easier. Asynch is used in RS232 and you might be using it quite easily. Basically, asynch relies on the timing(Baud Rate) to be near accurate for it to work right. Try doing a serial transmission with interrupts on and you will see why it is so important to have a perfect timing.

    SPI or any synch protocol for that matter makes life simpler by qualifying the data bit via a clock bit. The simplest analogy would be a serial to parallel shift register like the CD4094. You set up the data bit, CLOCK it in, next data bit, CLOCK it in, and so on.

    Now, you will say; but, spi has 4 wires. Yes it does. One of them is for the Chip selection. The communication only works when the chip is selected via the ChipSelect line.

    So, one data line going to the Serial-Parallel register SDI, one data line coming from the Parallel-Serial register SDO, one clock line to clock both these registers together and a chipselect that enables all this to work.

    Look at this image to understand the concept better.
    Name:  SPI.GIF
Views: 1582
Size:  2.3 KB

    Advantage of SPI, you can clock in/out the data without strict timing requirements, at your own pace.

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