How to configure SPI in PICBASIC PRO?


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Jun 2005
    Location
    Penang
    Posts
    40


    Did you find this post helpful? Yes | No

    Default Resistor..

    Had you tried placing pull down resistor on SS pin.There is a chance slave get "crazy" as the SS pin will sometimes float (OC).

  2. #2
    Join Date
    Mar 2007
    Posts
    5


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by NatureTech View Post
    Had you tried placing pull down resistor on SS pin.There is a chance slave get "crazy" as the SS pin will sometimes float (OC).
    Yes, I have added the pull down resistor at SS pin but it still could not work.

    I have some doubts on how to write and read SSPBUF in PICBASIC PRO.

    When I execute the following code, which I assume it as 'write to SSPBUF':
    SSPBUF = "?"
    I could see a 8-pulse train at SCK of the master.

    If I'm not mistaken, communication between master/slave is initiated by SCK (clock) of the master, right? If that is the case, how do we read (in PICBASIC PRO) from the slave? Pls refer to the code below:
    IF SSPBUF<>"!" Then getdata
    Pls advise if there is any read operation above? How does the master start the clock during read operation?

    Thanks.

Similar Threads

  1. VB.net and Picbasic Pro
    By Pesticida in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 15th November 2007, 20:18
  2. Replies: 0
    Last Post: - 22nd November 2005, 13:16
  3. Question for all that use MELABS PICBASIC PRO
    By oskuro in forum Off Topic
    Replies: 2
    Last Post: - 24th March 2005, 17:15
  4. PicBasic Pro & PicBasic syntax different
    By Billyc in forum General
    Replies: 5
    Last Post: - 16th April 2004, 21:19
  5. PicBasic Pro FSK Modem
    By mikep in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 29th October 2003, 14:21

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