PIC508/9 Header


Closed Thread
Results 1 to 6 of 6

Thread: PIC508/9 Header

  1. #1
    stay_aliveuk's Avatar
    stay_aliveuk Guest

    Default PIC508/9 Header

    I am relatively new to the PIC 12c508/9 family, but have used the 16c84 with some success in the past.

    Can anyone help me with setting up the ports etc (i think this is termed the header) in order that i can begin writing some software. I will be starting with blining a LED, but we all start somewhere.

    Many thanks

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    May I suggest (really consider taking up this suggestion!) you invest in some F-series parts to play with. They can be erased and reprogrammed 100,000 times or more.

    With a C-series part, it's a one-time only event. You make a mistake and it's land-fill. Unless of course you actually WANT a heap of PICs that will only ever blink a LED between now and doomsday and can't do anything else...

    Once you've got a working design - and you never, EVER want to make a change to the program, C-series parts are there because they're cheap. But you NEVER use them if you're learning or playing... (unless of course you happen to own the factory and you don't mind bucketloads of waste)...

  3. #3
    stay_aliveuk's Avatar
    stay_aliveuk Guest


    Did you find this post helpful? Yes | No

    Default

    Thanks for your reply, However, my 16c84 IC's can be programmed and erased many times so I presume you are meaning the 12cxxx range of IC's which are 'one timers'.

    I do have a jewel windowed 12c509 so I am able to re-programme it but, admittedly, after it has been under the sun lamp.

    So, can I presume you suggest developing the software on a EE flash type pic then once I am happy with it look at putting on to a 12cxxx pic?

    If so, then can you help with the first few lines of the code which are concerned with setting up the 12cxxx range of IC's, ie setting up the ports.

    Thanks again

  4. #4
    stay_aliveuk's Avatar
    stay_aliveuk Guest


    Did you find this post helpful? Yes | No

    Default

    Since writing the previous message I have looked into the 'F' range of IC's and you are spot on, these are what I should be playing with, top advice.

    Still could do with a pointer on what the first couple of lines should look like for say the 12F629, which is 8 pin device.

    For example I always start with (for the 16c84)

    ' Set Up PortB

    DIRS=%11111110 'set portb pins as input or output as necessary
    PINS=%00000000 'set all portb pins low (or as necessary for each application)

    ' End of PortB Set up

    'Main Program

    Best regards

  5. #5
    stay_aliveuk's Avatar
    stay_aliveuk Guest


    Did you find this post helpful? Yes | No

    Default

    I really should wait a while before posting a reply. Since writing the above I have come across the following which may be what I am looking for:-

    '************************************************* ***************
    '* 12F629.BAS *
    '* *
    '* By : Leonard Zerman, Jeff Schmoyer *
    '* Notice : Copyright (c) 2002 microEngineering Labs, Inc. *
    '* All Rights Reserved *
    '* Date : 06/04/02 *
    '* Version : 2.42 *
    '* Notes : *
    '************************************************* ***************

    BANK0 $0020, $005F
    EEPROM $2100, $217F
    LIBRARY "PBPPIC14"

    include "PIC14EXT.BAS"

    PORTL VAR GPIO
    PORTH VAR GPIO
    TRISL VAR TRISIO
    TRISH VAR TRISIO

    include "PBPPIC14.RAM"

    '*-----------------------* EOF 12F629.BAS *---------------------*

    It appears to be a generic header for the 12f629 afterwhich the main program is written. If so can you 'decifer' it for me, ie are the ports set up as ins or outs and are they set high or low to begin?

    Thanks

  6. #6
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

Similar Threads

  1. Replies: 17
    Last Post: - 12th April 2014, 02:17
  2. meLabs Program Header aid
    By boroko in forum General
    Replies: 0
    Last Post: - 13th November 2009, 09:37
  3. need help in Sony S.I.R.C at 20/40 mhz
    By ferds in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 24th February 2006, 06:02
  4. Replies: 2
    Last Post: - 13th December 2005, 00:11
  5. Select Case syntax
    By keithdoxey in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 27th September 2005, 19:19

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