cwkoehler
10-17-06, 07:21 PM
Hello,
I need to dynamically create an array based on a number of ADC0 analogin U. values returned during a short time period (approx 1 second). The method I am currently using only gives me 30-35 readings within my application and I realize that the PC C# code is the root of the problem. However, I can get around this by temporarily storing the ADC values in an array on the ISOPODX and then retrieving when prompted. The code below provides the serial TX of the ADC0 values that I need while the ADC1 values dictates the start and stop of the data collection. Any insight into how to create the dynamic array within the following code structure would be greatly appreciated. Thanks in advance for your reply.
SCRUB
HEX
HERE 80 4 + ALLOT CONSTANT RBUFF EEWORD
RBUFF 80 4 + SCI0 RXBUFFER
HERE 256 4 + ALLOT CONSTANT TBUFF EEWORD
TBUFF 256 4 + SCI0 TXBUFFER
VARIABLE MTR-STOP EEWORD
: TURNOFF
PWMA0 OFF
PA0 OFF
; EEWORD
: EXTEND
BEGIN
CCCC PWMA0 PWM-OUT
PA0 OFF
( I need to create the array here - the array index for the storage of ADC0
(values will increment by 1 until the the ADC1 shutoff value is reached
ADC0 ANALOGIN U.
ADC1 ANALOGIN 4200 > UNTIL
TURNOFF
41 SCI0 TX ;
: RETRACT
BEGIN
3333 PWMA0 PWM-OUT
PA0 ON
ADC1 ANALOGIN 100 = UNTIL
TURNOFF
41 SCI0 TX ;
: START
PWMA0 INDEPENDENT
4E2 PWMA0 PWM-PERIOD
; EEWORD
Thanks again
Chris
I need to dynamically create an array based on a number of ADC0 analogin U. values returned during a short time period (approx 1 second). The method I am currently using only gives me 30-35 readings within my application and I realize that the PC C# code is the root of the problem. However, I can get around this by temporarily storing the ADC values in an array on the ISOPODX and then retrieving when prompted. The code below provides the serial TX of the ADC0 values that I need while the ADC1 values dictates the start and stop of the data collection. Any insight into how to create the dynamic array within the following code structure would be greatly appreciated. Thanks in advance for your reply.
SCRUB
HEX
HERE 80 4 + ALLOT CONSTANT RBUFF EEWORD
RBUFF 80 4 + SCI0 RXBUFFER
HERE 256 4 + ALLOT CONSTANT TBUFF EEWORD
TBUFF 256 4 + SCI0 TXBUFFER
VARIABLE MTR-STOP EEWORD
: TURNOFF
PWMA0 OFF
PA0 OFF
; EEWORD
: EXTEND
BEGIN
CCCC PWMA0 PWM-OUT
PA0 OFF
( I need to create the array here - the array index for the storage of ADC0
(values will increment by 1 until the the ADC1 shutoff value is reached
ADC0 ANALOGIN U.
ADC1 ANALOGIN 4200 > UNTIL
TURNOFF
41 SCI0 TX ;
: RETRACT
BEGIN
3333 PWMA0 PWM-OUT
PA0 ON
ADC1 ANALOGIN 100 = UNTIL
TURNOFF
41 SCI0 TX ;
: START
PWMA0 INDEPENDENT
4E2 PWMA0 PWM-PERIOD
; EEWORD
Thanks again
Chris