1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

programming 12c508a

Discussion in 'Microcontrollers' started by kamelat, Oct 14, 2017.

  1. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    I was just saying you got watch them chips there bad for RMW and you only get program it once I'd use shallow reg and write all at once.
     
  2. kamelat

    kamelat New Member

    Joined:
    Oct 14, 2017
    Messages:
    11
    Likes:
    0
    I'm sorry...
    well I'm using pin::
    4 and 7 to stay high for 10 sec
    then the 7th turned off

    about the programmer I don't have any programmer yet
     
  3. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    6,070
    Likes:
    524
    Location:
    Cleveland, OH, USA
    ONLINE
    But your current request is not what you asked in post #14. I will not do your project for you, particularly based on such vague and changing needs.

    The programmer will make a difference as none of the current low-cost programmers (i.e., PicKit 3 or ICD3) from Microchip will program your chip. PicStart Plus will do it. Do you have a source for that programmer?

    My best advice, since you know C, is to use that language and a 12Fxxx or 12F1xxx chip along with the newer version of MPLab that you have.

    Good luck.

    John
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn

    Pin 4 is gp3 is input only pin 7 gpo and gp2 you got set it in option reg

    Id go with one of them newer chips to there way more fun I got one that can do all kind of stuff and the mplab MMC works good to set up the chip for C programming
     
  6. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    I was looking at that I'm going to make it with a 12F1822 just for fun.
     
  7. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,310
    Likes:
    914
    Location:
    Rochdale UK
    How?? That chip has only 5 outputs. Better to rethink. You will need to use a slightly bigger chip unless you use a port expander!!
     
  8. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    It work lan red and green on at same time one red one green but a bigger chip be way easier.
    Now that's just for one kind of stop light
    If cars and people plus car sensors then you need lots more pins then 4
     
  9. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    6,070
    Likes:
    524
    Location:
    Cleveland, OH, USA
    ONLINE
    While for a good period, red and green are on at the same time, one has to deal with yellow on, green off at the same signal.

    The six leds can be done independently with just 3 pins. In fact, that is often used for an example of charlieplexing.
     
  10. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    Red lights for cars can be red on and green on then on change yellow will come on not to hard to do with a 12f chip
    But there a lot more happens if it's a city light they see if there are cars waiting plus control people.
     
  11. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    6,070
    Likes:
    524
    Location:
    Cleveland, OH, USA
    ONLINE
    I agree there are just 4 states.

    I vaguely remember some years ago an attempt to show drivers when the red was about to change to green. The stupidity of that was quickly realized.

    In trying to find a citation for it, I found that Audi's great minds are putting a "green anticipation" signal in cars (https://blog.caranddriver.com/when-will-traffic-lights-turn-green-some-audi-cars-now-know/ ). That might work when people don't run yellow lights with abandon, but I wouldn't want to see the effects in Cleveland.
     
  12. kamelat

    kamelat New Member

    Joined:
    Oct 14, 2017
    Messages:
    11
    Likes:
    0
    jpznhzlt
    ============
    Hello again,
    I'm sorry because I'm a begginer in microcontrollrers
    So, please can you help me just to begin...
     
  13. kamelat

    kamelat New Member

    Joined:
    Oct 14, 2017
    Messages:
    11
    Likes:
    0
    and for the programmer I will find out how to find one...
     
  14. Daniel Wood

    Daniel Wood Member

    Joined:
    Jun 15, 2012
    Messages:
    71
    Likes:
    9
    Location:
    Derby
    It could be a pedestrian stop light on a one-way street?
    Wouldn't the version of MPASM compiler be more important than the version of MPLAB used?
     
  15. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    MPASM only comes with mplab nowdays
     

Share This Page