Billy24 Posted November 10, 2015 Posted November 10, 2015 Hi Folks,I'm new to Autoit and I'm messing around with some SPI device interfacing.What I am trying to do is Map specific output Ports on my connected device to reflect a specific bit within a variable.So for instance if I have an integer:Local $iOUTPUTS = 0xAFand I have 8 separate Output ports on my device:declared as: POUT0 to POUT7 So within Autoit, how can I assign specific Bits from the same variable to different Ports on my device?Essentially what I'm trying to do is create a parallel port on my SPI device using its I/O ports and have it reflect a single Variable.Bit0 of "iOUPOUTS" = PORT0 Bit1 of "iOUPOUTS" = PORT1 Bit2 of "iOUPOUTS" = PORT2 Bit3 of "iOUPOUTS" = PORT3 Bit4 of "iOUPOUTS" = PORT4 Bit5 of "iOUPOUTS" = PORT5 Bit6 of "iOUPOUTS" = PORT6 Bit7 of "iOUPOUTS" = PORT7 In C programming I believe this is done using a LAT function like that shown below:#define RB15 LATBbits.LATB15 #define RB14 LATBbits.LATB14 #define RB13 LATBbits.LATB13 #define RB12 LATBbits.LATB12 #define RB11 LATBbits.LATB11 #define RB10 LATBbits.LATB10 #define RB6 LATBbits.LATB6 #define RB5 LATBbits.LATB5 #define RB4 LATBbits.LATB4However I need to implement this within Autoit and I'm wondering if there is a way to do this?Any help would be greatly appreciated.Cheers!-Billy
JohnOne Posted November 13, 2015 Posted November 13, 2015 I'm no big expert, but I'm reasonably certain there in no native functionality within AutoIt3 to accomplish this.What you might be better looking for is a third party dll which can, and using that from AutoIt. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now