Replace Shiftout with spi


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Jul 2006
    Posts
    60

    Default Replace Shiftout with spi

    Hello

    I want to replace this instruction
    Shiftout sdata , sclk ,MSBFIRST, [Lcd_out]
    to the spi comunication
    I have never use spi comunication, can anyone help me, a sample code perhaps

    thanks in advance

    Pedro

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    euh.. SHIFTOUT is already SPI!

    Give us more details!
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Sep 2003
    Location
    Vermont
    Posts
    373


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e
    euh.. SHIFTOUT is already SPI!

    Give us more details!
    I believe Pedro means hardware SPI. With that assumption, it would be good to know which processor you are working with Pedro. Shiftout/in works very well and it's easy(Thanks Melabs!) buuuuut... It can be slow. How fast do you need to go?

    Ron

  4. #4
    Join Date
    Jul 2006
    Posts
    60


    Did you find this post helpful? Yes | No

    Default

    Hi Ron

    Yes, i mean the hardware SPI
    Like You say the Shifout work very good but it is slow, i need to send a byte
    quickly to a lcd and perhaps with the hardware SPI pin can i have more speed
    The controller that i use is PIC 18F452

    Have You a sample code to do that, don't forget it must sent the MSBFIRST

    Thanks

    Regards

    Pedro

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Pedro,

    There's a sample SPI program on the meLabs website.

    http://www.melabs.com/resources/samples.htm

    Look for spimast.bas

    HTH,
    DT

  6. #6
    Join Date
    Jul 2006
    Posts
    60


    Did you find this post helpful? Yes | No

    Default

    Hi

    Yes i see the sample on melabs site but don't understand how to sent
    with the spi out pin the msbit first, say bit7, bit6, bit5, ... bit0

    Thanks for help
    Pedro

Similar Threads

  1. 7 Segment Displays and MAX7219
    By Bill Legge in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 31st October 2010, 18:30
  2. Smart Star (how to use shift registers)
    By mackrackit in forum Code Examples
    Replies: 3
    Last Post: - 30th November 2008, 20:06
  3. Using SPI with External Interrupts
    By shaiqbashir in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 29th June 2008, 04:08
  4. 16-bit SPI problem
    By shaiqbashir in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th June 2008, 15:42
  5. SPI instead of SHIFTOUT - MAX7219
    By Momboz in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 26th April 2008, 22:58

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