How to configure SPI in PICBASIC PRO?


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Jan 2006
    Location
    New Hampshire, USA
    Posts
    107


    Did you find this post helpful? Yes | No

    Default

    The datasheet says that setting TRISA = 1 sets the port as input. I believe you have it backward.

  2. #2
    Join Date
    Mar 2007
    Posts
    5


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Russ Kincaid View Post
    The datasheet says that setting TRISA = 1 sets the port as input. I believe you have it backward.
    Noted...
    Should be...
    TRISA = %11111111 'set PORTA.5 as input.

    Thanks...

  3. #3
    Join Date
    Mar 2007
    Posts
    5


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Russ Kincaid View Post
    The datasheet says that setting TRISA = 1 sets the port as input. I believe you have it backward.
    Ooopss... PORTA.5 should be set as input to enable the SS. Pls correct me if I'm wrong. Thanks.

  4. #4
    Join Date
    Jan 2007
    Posts
    3


    Did you find this post helpful? Yes | No

    Default

    Hi, moogle,

    I have followed your "pilgrimage" through several forums looking for helping to make to work your SPI routines.

    I also have verified the little interest that some manufacturers put in helping their clients, for example Microchip and Crownhill, this last is incapable to put a simple example of a Masters and a Slave working in SPI communications.

    I have begun to try to start up your routines but they do not work and I do not dare to write in the forums since the answers that they gave you, have been sufficiently frustrating for my.

    Well, your routines seem enough to learn a PIC-to-PIC SPI, so, if you have them working, please, put them here in the forum or send me them by mail.

    Regards,

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    So let me see if I've got this right:

    I also have verified the little interest that some manufacturers put in helping their clients, for example Microchip and Crownhill, this last is incapable to put a simple example of a Masters and a Slave working in SPI communications.
    So Microchip doesn't have any examples? There's plenty to be found in the datasheets. And any problems with the SPI module (and there are a couple here and there) are found in the errata sheets, complete with workarounds...
    And Crownhill? Well, I don't use the Proton compiler they sell. But it seems to me that if the compiler works and it's still selling well, then it's probably a good bet that the SPI routines it comes with probably work fairly well also. And besides that, how about trying http://www.picbasic.org/forum/ or http://www.google.com . The Search functions work great and I'll bet you can find loads of good examples for code at either.

    I have begun to try to start up your routines but they do not work and I do not dare to write in the forums since the answers that they gave you, have been sufficiently frustrating for my.
    So, even though the original poster wrote in the forums looking for help because the program didn't work, you assumed that it would actually work for you and it didn't? Imagine that...

    Well, your routines seem enough to learn a PIC-to-PIC SPI, so, if you have them working, please, put them here in the forum or send me them by mail.
    So what you actually want is somebody else to do all the legwork for you.

    I am correct so far?
    Last edited by skimask; - 14th April 2007 at 06:21.

  6. #6
    Join Date
    Jan 2007
    Posts
    3


    Did you find this post helpful? Yes | No

    Angry

    Hi skimask,

    Thanks you very much!, your answer is the answer that anybody can expect from people as you!.

    First of all, you say that there are a lot of examples in the Datasheets of Microchip, yes, with many errors, enough , even, to create controversies, see the PIClist, for instance. You suggest to visit the Proton+ forum or to search in Google. These suggestions are offensives. Of course!, I have search though Google, I have visited a dozen of specialized forums and I have not found a simple (only simple!) working SPI routine for a simple PIC to PIC communication in Assembler, nor in PICBasic Pro, nor in PICBasic Plus, nor in Proton, the only thing I have found is a lot of people looking for any good suggestion and all of them received suggestions as yours, nothing. So, you are not correct!.

    Second, no, sir, no, I do not assume that anybody works for me, I assume that Internet is a good site to learn anything (I am a simple hobbyst), I assume that if moogle have posted a simple routine looking for help, probably he has not problem ( I say "probably, he has not problem...", I do not say "he is forced to...") to send or to post the same routine free of errors (their routines seem very good but I think there are not NASA's designs. Sorry, moogle, that is for skimask). Moreover, before I have decided to post my message to moogle, I have spent more than one week testing my own and other routines. So, you are not correct!.

    Finally, instead of spending your precious time saying the idiot who I am, it will been simpler to put a simple link to one of the many sites in which according with you, there is a simple SPI routine of PIC to PIC. I am correct so far?

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by virolay View Post
    Thanks you very much!, your answer is the answer that anybody can expect from people as you!.
    Search the posts here. If you can find less than say, 50 answers I've given out to others, I'll write your code for you, test it, and hand deliver it, straight to your workshop, program your chip, and cook dinner for you.

    Quote Originally Posted by virolay View Post
    Finally, instead of spending your precious time saying the idiot who I am, it will been simpler to put a simple link to one of the many sites in which according with you, there is a simple SPI routine of PIC to PIC. I am correct so far?
    No, you are not correct...so far.
    Did I call you an idiot? Nope. Anybody else see that? Nope. Did I imply that? Nope.
    Would it have been simpler for me to link you to an SPI routine? Yep. Would you have actually learned something in the end? Nope.
    In my little world, it runs right back the old 'teach a man to fish' thing.

    Now then, post some code that YOU have written (not just some cut-and-paste from somebody else). And when you can't figure out why it doesn't work or why something isn't doing what you want it to do, you'll figure out what sort of answers I (or anybody that frequents these forums) can give out.

  8. #8
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Hi, Skimask

    Take it easy ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  9. #9
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by virolay View Post

    I have followed your "pilgrimage" through several forums looking for helping to make to work your SPI routines.

    I also have verified the little interest that some manufacturers put in helping their clients, for example Microchip and Crownhill, this last is incapable to put a simple example of a Masters and a Slave working in SPI communications.


    Regards,
    My Dear Virolay,

    IF you were a PicBasicPro fan ... ( pfffff !!!!) you should have had YOURSELF your first look HERE :

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

    ... I'm really not used to link pics between themselves ( LOL ) ... but straight found THIS:

    spimast routine for ... spimaster
    Spislave routine for ... spislave !!!

    Now, I can understand you're a very great man AND/OR think you really are ...

    BUT, that doesn't allow you to write stupidities about suppliers from your second post on this forum ...

    " I want this " is definitly not the good key here ... so far we don't know ANYTHING about what you had hoped to realize.

    Have a nice afternoon

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

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