Announcement

Collapse
No announcement yet.

Analog Input in Genie

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Analog Input in Genie

    I am using a Gen 4 35DT, programing via the Genie environment, using Workshop 4.6.x and I can't seem to find a way to set an input pin to Analog. According to the datasheet pins PA0,1, 2 & 3 are 3.3v analog capable and each pin has three modes (standard, averaged mode & high speed), but I can't seem to find any way to set the pin to Analog or set the mode on the Genie PinInputX object. Can someone point me to instructions on this?

    -K

  • #2
    Hi,

    Please refer to this appnote on how to set an input pin to PA0, PA1, and PA2:
    AN-00033 ViSi Genie Pin Input and Output for Diablo16 Display Modules

    Best regards,
    Sherwin

    Comment


    • #3
      Originally posted by sherwin4D View Post
      Hi,

      Please refer to this appnote on how to set an input pin to PA0, PA1, and PA2:
      AN-00033 ViSi Genie Pin Input and Output for Diablo16 Display Modules

      Best regards,
      Sherwin

      Sherwin,
      Thank you, but I have already reviewed that App Note and there is nothing in it about setting the pin to be used as an ANALOG INPUT. Everything in that app note is concerning using the pin as a digital input. I need to use the pin in it's analog mode as detailed in the datasheet.

      From section 4.3 of the datasheet:

      "PA0-PA3:General purpose I/O pins, or can serve as Analog Input pins. Each pin can be individually set for INPUT or OUTPUT or ANALOG."

      From section 4.12 of the datasheet:
      "The analog inputs can be read using three modes, standard mode, averaged mode or high speed mode."

      -Keith

      Comment


      • #4
        Hi Keith,

        Apologies on that.

        If that is the case, you would need to have WS4 IDE Pro License to be able to access the Internal Function that would allow you to set PA0-PA3 to ANALOG INPUT.

        Please have a look at this appnote on how to add Magic Code in your ViSi-Genie project:
        AN-00199 ViSi-Genie Magic Code Insertion Points

        To set the pins to ANALOG INPUT, please refer to this appnote:
        AN-00052 Designer or ViSi Analogue Input

        For more information regarding the function, please see page 24 of DIABLO16 Internal Functions Manual.

        I hope this helps. If you have further question, please let us know.

        Thanks and kind regards,
        Sherwin

        Comment


        • #5
          Originally posted by sherwin4D View Post
          Hi Keith,

          Apologies on that.

          If that is the case, you would need to have WS4 IDE Pro License to be able to access the Internal Function that would allow you to set PA0-PA3 to ANALOG INPUT.

          Please have a look at this appnote on how to add Magic Code in your ViSi-Genie project:
          AN-00199 ViSi-Genie Magic Code Insertion Points

          To set the pins to ANALOG INPUT, please refer to this appnote:
          AN-00052 Designer or ViSi Analogue Input

          For more information regarding the function, please see page 24 of DIABLO16 Internal Functions Manual.

          I hope this helps. If you have further question, please let us know.

          Thanks and kind regards,
          Sherwin

          Sherwin,
          Having looked over those documents, where would you suggest setting the insertion point for the magic code to insure that the pin is set to analog as soon as the display initializes (and stays set that way for the duration of the run)?

          -Keith

          Comment


          • #6
            Hi Keith,

            I would make the insertion point in PreGenieInit.

            I hope this helps

            Best regards

            Paul

            Comment


            • #7
              Originally posted by pauleilio View Post
              Hi Keith,

              I would make the insertion point in PreGenieInit.

              I hope this helps

              Best regards

              Paul
              Thanks Paul,
              That was actually one of the places I wasn't considering, as I was concerned that the Init process would reset the pin's status if it was set before.

              -Keith

              Comment

              Working...
              X