16c72 and portc


Closed Thread
Results 1 to 4 of 4

Thread: 16c72 and portc

  1. #1

    Default 16c72 and portc

    Does PORTC on a 16C72 default to outputs or do I need to put in some sort of register command.

    The port has multi functions I see......getting some wierd behavior on everything but C0 and C4.

    If so, what do I include to make the port I/O pins?

    Thanks

  2. #2


    Did you find this post helpful? Yes | No

    Default

    Hi Michael. I use the 16C72A frequently. Now using 16F73 as a substitute. It is on a board that uses portc only as outputs and I never had a problem using any or all of them. This was at the top of my last program. Try this at the top of your program and see what happens:
    ADCON1 = 7 'set inputs to digital
    @ DEVICE WDT_ON, BOD_ON, PWRT_ON, PROTECT_ON
    TRISA = %00110010 'RA1,4,5 INPUTS, REST OUTPUTS
    TRISB = %11111101 'RB1 OUTPUT, REST INPUTS
    TRISC = %00000000 'ALL OUTPUTS

  3. #3


    Did you find this post helpful? Yes | No

    Default

    this is very strange.....everything checks out....micro code studio shows 16C72....using EPIC for windows....power up timer on. (wdt makes no difference)

    not only does it do this on the 2 new windowed chips I bought from digi key but some otp chips I have on the shelf.

    I even did some ultra simple code with pulsout.

    DEFINE OSC 4
    ADCON1 = 7
    TRISA = %11111111 (ALL TIED TO 10K PULLUPS)
    TRISC = %10000000 (C7 IS AN INPUT)

    START:
    PULSOUT PORTC.0,5000 (Led's tied to C0 thru C6)
    PULSOUT PORTC.1,5000
    ETC to PORTC.6

    GOTO START

    I get a pulsout on C0 and C3 but nowhere else!!

    Vss and Vdd are fine.....Led's are fine.

    There are alot of functions for portc.....are you sure there isn't some register involved?

    By the way, I've never put the device in the header.....I thought if it was chosen in MCS, that's all you need.

  4. #4


    Did you find this post helpful? Yes | No

    Default

    God Damnit !

    I had some 1 meg resistors fall into my box of 560's or like an idiot saw green and brown and put them in the wrong box.

    Try driving an LED with 1 meg.

    $#&^ IT.

    Another worthwhile post on my part.

Members who have read this thread : 1

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