from the Yahoo Forum --
Hello BasicNode,
It is ArmBASIC Kernel 7.57. It is a USB DIN kit.
Also, all the Digital inputs on the flexible IO's seem to be registering and
changing correctly.
The six AD inputs that I am trying to convert to Digital inputs are all
registering (-1).
I noticed I had stopped receiving the forum on Yahoo.
Thanks
Carl
From: basicnode <
bruce@coridium.us>
To:
ARMexpress@yahoogroups.com
Sent: Friday, May 10, 2013 5:09 PM
Subject: [ARMexpress] Re: Trouble Changing AD pins to Digital IO
Which version of firmware are you using? Is it USB or Ethernet connected?
Firmware version reported in the Welcome message, which appears when you hit
STOP in BASICtools
brucee
PS, I'm going to move this to the Coridium Forum, Yahoo seems to be trying to
kill off the Groups
www.coridium.us/forum
--- In
ARMexpress@yahoogroups.com, "klug.carl" <klug.carl@...> wrote:
>
> I am using a Bourns 4116R LF 101-1 resistor array.
> It is installed in the R15 location with Pin 1 adjacent to the C4 marking on
the board.
> This is how I have it written in my program.
> #include "LPC21xx.bas"
> PINSEL1 AND= &HC003FFFF
> FIO1DIR OR= 1<<16
> FIO1DIR OR= 1<<17 'Open Fr Lat Mot
> FIO1DIR OR= 1<<18 'Close Fr Lat Mot
> FIO1DIR OR= 1<<19 'PM-2 Raise Rear Rail
> FIO1DIR OR= 1<<20 'PM-1 Lower Rear Rail
> FIO1DIR OR= 1<<21 'Valve 1
> FIO1DIR OR= 1<<22 'Valve 2
> FIO1DIR OR= 1<<23 'Valve 3
>
> From ArmBASIC Help
> "D pins are configured as ADs. To return them to IOs, the PINSEL register
needs to be written (details in the NXP LPC2138 User Manual)
>
> PINSEL1 AND= &HC003FFFF ' return ADs to IOs"
>
> Is it also necessary to set the IO up like is says for BASICchip
> 'x = IO(11) ' make AD(0) an IO
> x = IO(32) ' make AD(1) an IO
> x = IO(33) ' make AD(2) an IO
> x = IO(34) ' make AD(3) an IO
> x = IO(35) ' make AD(4) an IO
> x = IO(36) ' make AD(5) an IO"
>
>
> I also tried it with this and also using 26,25,30,29,28,27 instead of
11,32,33,34,35,36.
>
> I don't seem to be getting this.
>
> Carl