Jump to content

peethagoras

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About peethagoras

  • Rank
    Newbrie
  1. Hello all, new member here. I wonder if anyone can throw some light on my PIC_problem: I bought ten Pic16F628A chips off an EBAY seller, and have that all of them, except for one, refuse to behave as a PIC should: set all pins as outputs, and make them high. Simple? not so. I cannot get any of them to function, the only thing that happens is that portB,0 is always high.Here's the code to output all highs just using portB (PortA also does not work; I had previously made sure that portA was set as all digital inputs before testing that port.), Note that I set the config to eliminate the /MCLR reset function, and I have chosen the internal clock, with no clock out, because I need all the pins available. I have tried the chip with an external clock, @ 4MHz, but it made no difference. #include <p16f628a.inc> ; __CONFIG _WDT_OFF & _PWRTE_OFF & _INTOSC_OSC_NOCLKOUT & _MCLRE_OFF & _BODEN_OFF & _LVP_OFF & _DATA_CP_OFF & _CP_OFF ; ORG 0 ; CLRF PORTB BANKSEL TRISB MOVLW B'00000000' MOVWF TRISB BANKSEL PORTB MOVLW B'11111111' MOVWF PORTB ; LOOP: GOTO LOOP ; END I have tested this simple code on a Pic16F84A, a PIc16F877, and even a Pic 16F688, all work fine. Have I done something stupid? or have I been sold a bunch of phoney chips? Thanks in advance for any comments.
×