Shot meself in the foot again...


Closed Thread
Results 1 to 12 of 12

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Number or PORT real name or Alias to pin it has to work

    Have a look to section 4.11, or in MCS Help topics>>PICBASIC PRO Basics>>> Pins

    To me, real port name (PORTB.3) or aliases (DO) is more valuable than pin #.

    But... it's me
    Code:
        SS                   var PORTB.1 ' ISD4002 SS pin
        SCLK                 var PORTB.2 ' ISD4002 SCLK pin
        MOSI                 var PORTB.3 ' ISD4002 MOSI pin
        MISO                 var PORTB.4 ' ISD4002 MISO pin
        '
        '
        '
        '
        ss = 0
        shiftout MOSI,SCLK,LSBFIRST,[ISDword\16]
        ss = 1
        '
        '
        '
        '
        ss=0
        shiftin miso,sclk,lsbpre,[isdpointer\16]
        ss=1
    Last edited by mister_e; - 21st June 2007 at 14:39.
    Steve

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

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


    Did you find this post helpful? Yes | No

    Default

    Peter,

    How is the beasty supposed to know that 2 means portc.2....The thing is I gotta use 0 - 7 as the clockpin
    Not sure if you really mean "I gotta use 0 - 7".

    Usually PORTC.2 is number 10, but that depends on the chip you are using.
    If you really need it to be 0-7, see this thread for how to change it.

    http://www.picbasic.co.uk/forum/show...ht=PORTL+PORTH

    HTH,
    DT

  3. #3
    Join Date
    Jun 2005
    Location
    Up the bush, Western Plains, NSW Au
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    Right, I'll have a look at that in a jiffy.
    Meantime, I "delooped" the thing and addressed each CLOCKPIN as exactly what it was, eg PORTC.0 up to PORTC.7 and now works perfect. Still don't think that was what I did on the previous thing but....


    I'll go have a look at that link now and play around some more...
    Peter Moritz.
    Up the bush, Western Plains,
    New South Wales,
    Australia.

  4. #4
    Join Date
    Jun 2005
    Location
    Up the bush, Western Plains, NSW Au
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    Yep, that done it.
    Has anyone ever done a edited version of the PBP manual with all this stuff included? Or asked MELABS to add to the original manual?????????

    Hope they are reading this!!!

    Thanks shiploads blokes, you are life savers as always. I've locked the ammo away again, but kept the rifle out to belt meself about the head.
    Peter Moritz.
    Up the bush, Western Plains,
    New South Wales,
    Australia.

  5. #5
    Join Date
    Jun 2005
    Location
    Up the bush, Western Plains, NSW Au
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    Hi all.
    As a follow-up to my previous, Would it be feasable to start a thread or even a full forum containing all those undocumented little gems that some people discovered. I think it would be a real good help to some people, 'specially twits like me?
    Peter Moritz.
    Up the bush, Western Plains,
    New South Wales,
    Australia.

  6. #6
    Join Date
    Aug 2006
    Location
    In a world of german electrons
    Posts
    102


    Did you find this post helpful? Yes | No

    Default

    Hey muddy0409, how does your foot feel in the meantime ?
    Be well - whoever you are.

  7. #7
    Join Date
    Jun 2005
    Location
    Up the bush, Western Plains, NSW Au
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    Gettin' better slooooowwly!
    Attached Images Attached Images  
    Peter Moritz.
    Up the bush, Western Plains,
    New South Wales,
    Australia.

Similar Threads

  1. One Shot Rising
    By MarcBergeron in forum General
    Replies: 1
    Last Post: - 27th September 2009, 21:55
  2. Re: Recommended PCB foot prints
    By Steve_88 in forum Off Topic
    Replies: 0
    Last Post: - 30th June 2007, 17:56

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