Loading ...
Sorry, an error occurred while loading the content.

Re: More on PIC12c508

Expand Messages
  • fierywanderer
    Thanks, Pete for the helpful stupid questions. I had considered the possibility that my chip, or even my programming hardware might be defective, but I have
    Message 1 of 9 , Jul 1, 2006
    View Source
    • 0 Attachment
      Thanks, Pete for the helpful "stupid questions."

      I had considered the possibility that my chip, or even my programming
      hardware might be defective, but I have ignored that because the GPIO
      pins in question do not change their states even in the simulator. And
      I am using two chips, and have been unsuccessful with both.

      I am using a windowed chip, and, although I usually leave it in the UV
      eraser just long enough to get a successful blank check, there have
      been times when I have left it in the eraser for well over an hour,
      with the same results after programming the chip.

      I will take a picture of the breadboard circuit and upload it, and
      send the code as well. The circit is really simple, employing only the
      12c508 and the usual support components. Thank you very much.


      --- In SeattleRobotics@yahoogroups.com, "Pete Miles" <petem@...> wrote:
      >
      > Okay,
      >
      > Stupid set of questions here: Have you thought about the case that
      you might have a bad chip? Sometimes you get a bad
      > chip straigth from the manufacturer. Have you tried your program on
      another one?
      >
      > Next one, The 12C508 can only be programed once. Changing the
      program and retrying to program again isn't going to
      > work. The original program will stay there.
      >
      > Unless you are using the 12C508-JW then you can erase it with an
      eprom eraser. I have had times I didn't get a complete
      > erasure and the chip did wirk right until I left it in the eraser
      for half and hour.
      >
      > The other thing you could do is post the entire code you are having
      problems with, and a schematic of circuit so people
      > might be able to see a subtle error that is easily over looked.
      >
      > Pete
    • Doug Evans
      can you post your code? if the pin state is not changing in the simulator, you ve got a s/w issue. Bank switch, TRIS setting, _CONFIG setting, etc. -de ...
      Message 2 of 9 , Jul 1, 2006
      View Source
      • 0 Attachment
        can you post your code?

        if the pin state is not changing in the simulator, you've got a s/w issue.

        Bank switch, TRIS setting, _CONFIG setting, etc.

        -de


        -----Original Message-----
        From: SeattleRobotics@yahoogroups.com
        [mailto:SeattleRobotics@yahoogroups.com]On Behalf Of fierywanderer
        Sent: Saturday, July 01, 2006 2:41 AM
        To: SeattleRobotics@yahoogroups.com
        Subject: [SeattleRobotics] Re: More on PIC12c508


        Thanks, Pete for the helpful "stupid questions."

        I had considered the possibility that my chip, or even my programming
        hardware might be defective, but I have ignored that because the GPIO
        pins in question do not change their states even in the simulator. And
        I am using two chips, and have been unsuccessful with both.

        I am using a windowed chip, and, although I usually leave it in the UV
        eraser just long enough to get a successful blank check, there have
        been times when I have left it in the eraser for well over an hour,
        with the same results after programming the chip.

        I will take a picture of the breadboard circuit and upload it, and
        send the code as well. The circit is really simple, employing only the
        12c508 and the usual support components. Thank you very much.
      • fierywanderer
        Sure, Doug. Here it is: list p=12c508 radix hex timerzero equ 0x01 status equ 0x03 oscal equ 0x05 gpio equ 0x06 seconds_count equ 0x08 delay_reg
        Message 3 of 9 , Jul 1, 2006
        View Source
        • 0 Attachment
          Sure, Doug. Here it is:

          list p=12c508
          radix hex


          timerzero equ 0x01
          status equ 0x03
          oscal equ 0x05
          gpio equ 0x06
          seconds_count equ 0x08
          delay_reg equ 0x09
          half_sec_cont equ 0x0c
          minutes_count equ 0x0d
          temp_reg equ 0x10

          org 0x00

          movwf oscal ;oscillator calibration value.
          movlw b'00001000'
          tris gpio
          ;gpio all outputs except gpio,3
          movlw b'11000100'
          ;prescale timerzero at 1:32
          option
          clrf timerzero
          clrf gpio
          ;this completes setup

          lift_off movlw b'00110111'
          movwf gpio
          nop
          nop
          clrf gpio
          nop
          nop
          goto lift_off

          ;jump back to lift_off and loop indefinitely

          end


          --- In SeattleRobotics@yahoogroups.com, "Doug Evans" <DEvans@...> wrote:
          >
          > can you post your code?
          >
          > if the pin state is not changing in the simulator, you've got a s/w
          issue.
          >
          > Bank switch, TRIS setting, _CONFIG setting, etc.
          >
          > -de
          >
          >
          > -----Original Message-----
          > From: SeattleRobotics@yahoogroups.com
          > [mailto:SeattleRobotics@yahoogroups.com]On Behalf Of fierywanderer
          > Sent: Saturday, July 01, 2006 2:41 AM
          > To: SeattleRobotics@yahoogroups.com
          > Subject: [SeattleRobotics] Re: More on PIC12c508
          >
          >
          > Thanks, Pete for the helpful "stupid questions."
          >
          > I had considered the possibility that my chip, or even my programming
          > hardware might be defective, but I have ignored that because the GPIO
          > pins in question do not change their states even in the simulator. And
          > I am using two chips, and have been unsuccessful with both.
          >
          > I am using a windowed chip, and, although I usually leave it in the UV


          > eraser just long enough to get a successful blank check, there have
          > been times when I have left it in the eraser for well over an hour,
          > with the same results after programming the chip.
          >
          > I will take a picture of the breadboard circuit and upload it, and
          > send the code as well. The circit is really simple, employing only the
          > 12c508 and the usual support components. Thank you very much.
          >
        • Doug Evans
          Worked for me 1st time. I was able to duplicate your problem, however, by setting an external OSC option in the configuration settings. Once I did this, GPIO.4
          Message 4 of 9 , Jul 1, 2006
          View Source
          • 0 Attachment
            Worked for me 1st time.

            I was able to duplicate your problem, however, by setting an external OSC
            option in the configuration settings. Once I did this, GPIO.4 and GPIO.5
            stopped going high.

            GPIO.4 and GPIO.5 are OSC pins if you use external RC or XTAL. Double check
            your configuration bits in MPLAB (CONFIGURE/CONFIGURATION BITS).

            -de


            -----Original Message-----
            From: SeattleRobotics@yahoogroups.com
            [mailto:SeattleRobotics@yahoogroups.com]On Behalf Of fierywanderer
            Sent: Saturday, July 01, 2006 5:37 PM
            To: SeattleRobotics@yahoogroups.com
            Subject: [SeattleRobotics] Re: More on PIC12c508


            Sure, Doug. Here it is:

            list p=12c508
            radix hex


            timerzero equ 0x01
            status equ 0x03
            oscal equ 0x05
            gpio equ 0x06
            seconds_count equ 0x08
            delay_reg equ 0x09
            half_sec_cont equ 0x0c
            minutes_count equ 0x0d
            temp_reg equ 0x10

            org 0x00

            movwf oscal ;oscillator calibration value.
            movlw b'00001000'
            tris gpio
            ;gpio all outputs except gpio,3
            movlw b'11000100'
            ;prescale timerzero at 1:32
            option
            clrf timerzero
            clrf gpio
            ;this completes setup

            lift_off movlw b'00110111'
            movwf gpio
            nop
            nop
            clrf gpio
            nop
            nop
            goto lift_off

            ;jump back to lift_off and loop indefinitely

            end







            Visit the SRS Website at http://www.seattlerobotics.org
            Yahoo! Groups Links
          • Kenneth Maxon
            Rather than keep this information in a separate configuration file, had you considered using the device statement? My simulator (3 rd party) flagged an error
            Message 5 of 9 , Jul 1, 2006
            View Source
            • 0 Attachment
              Rather than keep this information in a separate configuration file, had you
              considered using the device statement? My simulator (3'rd party) flagged an
              error stating that IO pins that were not fully configured were being
              accessed.

              The lines below comes from a very old chunk of code that I worked on many
              years ago. Look at the device statement You need to change the parameters,
              however it is an example that should lead you to the right place in the
              documentation.

              ; Org 0 sets ROM origin to beginning for program.
              org 0

              ; Device data and reset vector.
              device pic16c54,xt_osc,wdt_off,protect_off
              reset begin

              The reason you might consider adding this to your source file rather than a
              separate configuration file is that it then becomes available to simulators
              and through the compilation process into your intermediate file for IC
              programmers, etc. This way it will not be lost again later if you move to
              different tool chains or firmware programmers. Although the syntax may be
              different in the new tool set, having the line in your source will flag an
              error or warning so that you know you need to go fix it.

              -Kenneth


              -----Original Message-----
              From: SeattleRobotics@yahoogroups.com
              [mailto:SeattleRobotics@yahoogroups.com]On Behalf Of Doug Evans
              Sent: Saturday, July 01, 2006 6:03 PM
              To: SeattleRobotics@yahoogroups.com
              Subject: RE: [SeattleRobotics] Re: More on PIC12c508


              Worked for me 1st time.

              I was able to duplicate your problem, however, by setting an external OSC
              option in the configuration settings. Once I did this, GPIO.4 and GPIO.5
              stopped going high.

              GPIO.4 and GPIO.5 are OSC pins if you use external RC or XTAL. Double check
              your configuration bits in MPLAB (CONFIGURE/CONFIGURATION BITS).

              -de


              -----Original Message-----
              From: SeattleRobotics@yahoogroups.com
              [mailto:SeattleRobotics@yahoogroups.com]On Behalf Of fierywanderer
              Sent: Saturday, July 01, 2006 5:37 PM
              To: SeattleRobotics@yahoogroups.com
              Subject: [SeattleRobotics] Re: More on PIC12c508


              Sure, Doug. Here it is:

              list p=12c508
              radix hex


              timerzero equ 0x01
              status equ 0x03
              oscal equ 0x05
              gpio equ 0x06
              seconds_count equ 0x08
              delay_reg equ 0x09
              half_sec_cont equ 0x0c
              minutes_count equ 0x0d
              temp_reg equ 0x10

              org 0x00

              movwf oscal ;oscillator calibration value.
              movlw b'00001000'
              tris gpio
              ;gpio all outputs except gpio,3
              movlw b'11000100'
              ;prescale timerzero at 1:32
              option
              clrf timerzero
              clrf gpio
              ;this completes setup

              lift_off movlw b'00110111'
              movwf gpio
              nop
              nop
              clrf gpio
              nop
              nop
              goto lift_off

              ;jump back to lift_off and loop indefinitely

              end







              Visit the SRS Website at http://www.seattlerobotics.org
              Yahoo! Groups Links











              Visit the SRS Website at http://www.seattlerobotics.org
              Yahoo! Groups Links
            • fierywanderer
              Thanks you all again for the replies. I tried running the code with thses are my header statements, but still no success. list p=12c508 include p12C508.inc
              Message 6 of 9 , Jul 2, 2006
              View Source
              • 0 Attachment
                Thanks you all again for the replies. I tried running the code with
                thses are my header statements, but still no success.


                list p=12c508

                include "p12C508.inc"

                __CONFIG _MCLRE_OFF&_CP_OFF&_WDT_OFF&_IntRC_OSC

                radix hex

                The code assembled fine, but gpio 4 and 5 still wouldn't turn on.
                Don't know what else to do, but to try another version of MPLAB
                perharps. Thanks, guys.



                --- In SeattleRobotics@yahoogroups.com, "Doug Evans" <DEvans@...> wrote:
                >
                > Worked for me 1st time.
                >
                > I was able to duplicate your problem, however, by setting an
                external OSC
                > option in the configuration settings. Once I did this, GPIO.4 and GPIO.5
                > stopped going high.
                >
                > GPIO.4 and GPIO.5 are OSC pins if you use external RC or XTAL.
                Double check
                > your configuration bits in MPLAB (CONFIGURE/CONFIGURATION BITS).
              • Doug Evans
                I m using 7.40 -de ... From: SeattleRobotics@yahoogroups.com [mailto:SeattleRobotics@yahoogroups.com]On Behalf Of fierywanderer Sent: Sunday, July 02, 2006
                Message 7 of 9 , Jul 2, 2006
                View Source
                • 0 Attachment
                  I'm using 7.40

                  -de


                  -----Original Message-----
                  From: SeattleRobotics@yahoogroups.com
                  [mailto:SeattleRobotics@yahoogroups.com]On Behalf Of fierywanderer
                  Sent: Sunday, July 02, 2006 5:14 PM
                  To: SeattleRobotics@yahoogroups.com
                  Subject: [SeattleRobotics] Re: More on PIC12c508


                  Thanks you all again for the replies. I tried running the code with
                  thses are my header statements, but still no success.


                  list p=12c508

                  include "p12C508.inc"

                  __CONFIG _MCLRE_OFF&_CP_OFF&_WDT_OFF&_IntRC_OSC

                  radix hex

                  The code assembled fine, but gpio 4 and 5 still wouldn't turn on.
                  Don't know what else to do, but to try another version of MPLAB
                  perharps. Thanks, guys.



                  --- In SeattleRobotics@yahoogroups.com, "Doug Evans" <DEvans@...> wrote:
                  >
                  > Worked for me 1st time.
                  >
                  > I was able to duplicate your problem, however, by setting an
                  external OSC
                  > option in the configuration settings. Once I did this, GPIO.4 and GPIO.5
                  > stopped going high.
                  >
                  > GPIO.4 and GPIO.5 are OSC pins if you use external RC or XTAL.
                  Double check
                  > your configuration bits in MPLAB (CONFIGURE/CONFIGURATION BITS).







                  Visit the SRS Website at http://www.seattlerobotics.org
                  Yahoo! Groups Links
                Your message has been successfully submitted and would be delivered to recipients shortly.