Menu

Setting the IO-Ports for 16C57

Help
2008-01-03
2013-05-30
  • Nobody/Anonymous

    Hi there,
    I'm really stuck with my first GC-Project. How on earth can I set the IO-Ports
    of the 16C57 to Input or Output ?

    I tried all possible ways to do it :

    DIR GPIO b'00000011'
    or
    DIR GPIO IN
    or
    DIR GPIO.0 IN
    or
    DIR PORTB.0 IN ' Speed
    or
    dir PORTA b'00000011'
    etc.

    BTW, which Port would "GPIO" specify ? A, B or C ?

    All I get are compiler erros, saying that it is not possible to set the IO-Pin or the this port does not exist.
    May anyone can point me in the right direction ?  Otherwise, GCBASIC seems to be great !

    regards and a happy new year,
        Reelf

     
    • Nobody/Anonymous

      If in doubt about the registers you can look at the GCBasic chipdata folder, then the device file in question.  You would not use GPIO, but PortA, B, or C, so:

      Dir PortB.0 in
      Dir PortB.1 in

       
    • Nobody/Anonymous

      Sorry, got the same warnings you had, so scratch that previous post. I can see I am not familiar with the 16CX series.

       
    • Nobody/Anonymous

      Thank you anyway for the reply. Nobody here every used or tried the 16C5x  or knows how to set the IO-Ports ???

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.