new to 8 pin pic


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    the program (under "existing program" line works fine.

    i want to transfer it to a 12f629 and continue to use it (and, if possible, add a section to it that will act as a timer to keep the relay on until the time has expired, turning the relay off.

    i'm not really proud of it, but i did write the code for the existing program.
    i do not want anybody to do it for me, thus the word "help"

    what is this forum for?
    i just wanted to be pointed in the correct direction.

    mike

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by hoyles View Post
    the program (under "existing program" line works fine.
    i want to transfer it to a 12f629 and continue to use it (and, if possible, add a section to it that will act as a timer to keep the relay on until the time has expired, turning the relay off.
    i'm not really proud of it, but i did write the code for the existing program.
    Well, if it works, then you should be proud of it. I don't care if it's the ol' blinky LED, or the next best nuclear fission controller. If it works, show it to the folks on the block... Can they do any better? Most likely not...

    Transfer the program! It should transfer right over...except for the fact that the 12F629 doesn't have a PortB... I'll let you figure that one out...

    i do not want anybody to do it for me, thus the word "help"
    what is this forum for?
    i just wanted to be pointed in the correct direction.
    Funny how that works...'cause that's exactly what people want these days...instant gratification... It's amazing how many folks are the 'one-post' types looking for something for nothing.

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default In The Data She . . .

    Hello hoyles,
    Open up the data sheet for the 12F . . . and see, as skimask said no port B, no Port A, funny thing called GPIO.
    search here: http://www.google.com/custom?hl=en&c...picbasic.co.uk search for 12F675 or whatever chip you like, lots of examples, use the link above unaltered.
    I set it as my home page, except I have it default to web search not picbasic forum search.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  4. #4
    Join Date
    Sep 2005
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    hey skimask,

    what do you do, get on this forum to make it harder to learn about pic programming?

    thought the purpose of this forum was to get information not to get humiliated.

    you must be in between bank robbing jobs (skimask) and have so much spare time on your hands that this is your way of getting pleasure.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by hoyles View Post
    hey skimask,
    what do you do, get on this forum to make it harder to learn about pic programming?
    thought the purpose of this forum was to get information not to get humiliated.
    Yep, that's exactly what I do...make it harder to learn...because that would require most people to actually put forth the effort to actually learn something new for a change, rather than be spoon fed, which is easier, yes? Which is exactly how I read your 1st post... and, AND, if you look REAL hard, you'll see that your 2nd post and my response to your 2nd post, along with Joe's follow-up to that, might also point you in the right direction to accomplish your goal.

    And BTW...
    you must be in between bank robbing jobs (skimask) and have so much spare time on your hands that this is your way of getting pleasure.
    Did you come up with that one yourself? Or did someone give it to you on a forum somewhere else?
    No, I don't have a lot of spare time. What I do have is a PC that's practically always on, so I leave a tab open to this site. When I pass by the workstation, I hit refresh and see what's up.

  6. #6


    Did you find this post helpful? Yes | No

    Default

    Hello hoyles,

    let me give you some pointers on that

    For the PIC12F629/675 you have no portb, it's called GPio

    So:

    where you have :
    Code:
    TRISB = %00000000
    pb0 var PORTA.0
    you need to have something like:


    trisio=%000001
    pb0 var gpio.0

    and for:

    Code:
    If pb0 = 1 and b0 = 0 Then one
    you need to have something like:

    if ( pb0=1 ) and ( b0=0 ) then one

    Get the ideia?
    Last edited by ruijc; - 22nd February 2008 at 18:03.

  7. #7
    Join Date
    Sep 2005
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    thanks ruijc,

    i guess what i should have asked first was, how to access the i/o pins on the 12f629 and how to identify them as inputs or outputs.
    can i assume that the 6 i/o ports will be gpio.0 thru gpio.5?
    are there any pull up resistors needed for the inputs?
    are there any picbasic cammands that may not be used in this pic?

    thanks,
    mike

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by hoyles View Post
    thanks ruijc,
    i guess what i should have asked first was, how to access the i/o pins on the 12f629 and how to identify them as inputs or outputs.
    can i assume that the 6 i/o ports will be gpio.0 thru gpio.5?
    are there any pull up resistors needed for the inputs?
    are there any picbasic cammands that may not be used in this pic?
    thanks,
    mike
    The answer to EVERY one of those questions is right in the PBP manual.

    -You ask about I/O ports, there's a couple of pages in the PBP manual that have specific (to the 8 pin PIC) examples of the 8 pin PIC I/O ports and accessing them, as either inputs or outputs and setting or reading those inputs or outputs.
    -You ask about pull ups? There may or may not be a section in the 12F629 datasheet about pullups.
    -You have a 12 bit PIC, there's a whole section in the PBP manual on the 12 bit PIC and commands that may or may not have special needs when used with 12 bit PICs.
    Tell me I'm wrong, and prove it, and I'll GIVE you every PIC I have in my desk drawer.
    Last edited by skimask; - 22nd February 2008 at 18:48.

  9. #9
    Join Date
    Sep 2005
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    thanks skimask,

    i did not realize that there was specific info on the 8 pin pic in the manual.

    that should be a great help.

    thanks again,
    mike

Similar Threads

  1. Is this a K Type sensor?
    By jessey in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 21st November 2009, 13:55
  2. newbe looking for PIC advice
    By Mad Professor in forum General
    Replies: 3
    Last Post: - 27th May 2009, 07:56
  3. PIC to PIC communication problem
    By precision in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 21st June 2007, 03:51
  4. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  5. 8 port Signal Loss Detector, possible to use a pic?
    By jamie_s in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 20th March 2006, 15:59

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