PIC 16f628a

Discussion in 'Programmer's Corner' started by jhh2012, Feb 11, 2012.

  1. jhh2012

    Thread Starter New Member

    Feb 10, 2012
    6
    0
    Hi everyone, I'm using Flowcode 4 to program a PIC 16f628a ( trying to run a 7seg display) and on connections for the 7 seg. it list A,B, C ect. on PORTB as 0 bit, 1 bit, 2 bit, ect. and the common is on PORTA 3 bit. My question is does this refer to seg. A on RB0, seg B on RB1, and seg C on RB3 ect. and common on RA3 of the IC. When I put this IC on a board is A connected to RB0, B conected to RB1 ect. and the common connected to RA3 of the IC? and if so what is it common anode or common cathode? I'm just starting (1st.try doing PIC's) and know very little) but have googled for hours for a schematics with this IC and 1- 7seg. display, but can only find for 3or 4 connected together also I thought the common went to neg. for common cathode and pos. for a common anode ? Thanks for any help Jim
    P.S. I have it working on the simulator on Flowcode 4 after 2 days, when you get old things don't come as fast as they once did Haha.
     
  2. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
  3. jhh2012

    Thread Starter New Member

    Feb 10, 2012
    6
    0
    I went and changed the 7seg properties to common anode and looked at the C code and it did change. So if the RA3 pin is common for both com. anode and com. cathode the program must change RA3 high for com. anode and low for com. cathode??? I can't do C yet (so many different ones to select from) but from my research I think C is what I'll try to learn as it seems used by most and has the best reviews. I need the very basics and not try to go to fast. THANKS Mark I sure need all the help I can get.
     
  4. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    Yes, it will also swap the values on all the PORTB pins. With just one 7 segment display there's not much need for a pin being used for the common pin, you could just connect it to ground or 5V.
    C is pretty popular and there are plenty of people who can help with it. I just use assembler, only 35 instructions to learn, but you have to deal more with the peculiarities of PICs.
     
  5. jhh2012

    Thread Starter New Member

    Feb 10, 2012
    6
    0
    Thanks Mark that answered my question. I've heard about assembler and I like 35 instructions haha. I'm 65 and I don't think and remember to good anymore (any excuse is better than none haha) so I'm sure I'll be back and THANKS again.
     
Loading...