Rest helped clear my mind
I will test this code as soon I arrive at my office:
I can't imagine simpler code to test the BOD function. Do you see something wrong?Code:@ device pic12f683,INTRC_OSC_NOCLKOUT , wdt_on, mclr_off, protect_off, bod_on CMCON0 = %00000111 ' Disable comparator VRCON = %00000000 ' disable ' I/Os TRISIO = %00000000 ' no inputs ' definitions ' init values if PCON.0=0 then gpio=%00000100 'Brown-out detected turn on LED on PIN5 else gpio=%00000010 'Brown-out NOT detected turn on LED on PIN6 endif 'main loop loop: goto loop





Bookmarks