GetADC Procedure Float Version and Function (Integer Version) BX-24

Started by gouardopatrick in BasicX8 years ago 1 reply

Hello, I want to read 4 AC voltage at 50 Hz coming from a Current Sensor using the BX-24. The BX-24 (or other type of processor) read only...

Hello, I want to read 4 AC voltage at 50 Hz coming from a Current Sensor using the BX-24. The BX-24 (or other type of processor) read only DC voltage but the idea is to use BX-24 to calculate the RMS value of the signal by finding the max value by successive GetADC commands. There are 2 versions of GetADC: -The integer version returns the raw 10-bit integer voltage -The float versi...


GetADC time

Started by p_dubinsky in BasicX13 years ago 2 replies

Does anyone know how long a GetADC command takes? Would it be faster to use an off module ADC (assuming 10 bit resolution)? ...

Does anyone know how long a GetADC command takes? Would it be faster to use an off module ADC (assuming 10 bit resolution)? Thanks, Paul


Question about using GetADC()

Started by Don Kinzer in BasicX13 years ago 3 replies

The BasicX System Library manual says that in order to use GetADC() you needn't configure the pin as an input. I did a quick...

The BasicX System Library manual says that in order to use GetADC() you needn't configure the pin as an input. I did a quick experiment to verify that and the evidence suggests that the statement is untrue. With nothing connected to pin 20, I first ran this code: Call


using GetADC to measure resistance

Started by flashsanchez in BasicX12 years ago 2 replies

I hooked up a potentiometer fine to my BX-24 and I have that running fine but now I am having problems trying to measure the...

I hooked up a potentiometer fine to my BX-24 and I have that running fine but now I am having problems trying to measure the resistance of a Cds. I guess this is more of a shortcoming of my knowledge of electronics but how exactly does the GetADC function work? The potentiomet


ADC broken?

Started by Jack Wu in BasicX14 years ago 4 replies

Hi i was playing with the GetADC command, i used a loop to gather the voltage off of a pin, i think it is broken because the...

Hi i was playing with the GetADC command, i used a loop to gather the voltage off of a pin, i think it is broken because the readings are always wrong. here is the code: -------- Do Voltage = GetADC(PinNumber) Debug.Print CStr(Voltage) Delay(0.50) Loop


Re: code timing (was ADC sampling)

Started by npoz0 in BasicX11 years ago 4 replies

Hey Tom, Thank you for your help and suggestions. I took out the ascii conversion. and I'm currently using this code to write to my...

Hey Tom, Thank you for your help and suggestions. I took out the ascii conversion. and I'm currently using this code to write to my sdcard: Do Until (GetPin(8) = 0) ADCdata(0) = GetADC(14) ADCData(1) = GetADC(15) Call PutQueue(OutputQueue, ADCdata(0),2) Call PutQueueStr(OutputQueue, ",") Call PutQueue(OutputQueue, ADCdata(1),2) Call PutQueueStr(OutputQueue


a little help

Started by loopstick2000 in BasicX12 years ago 2 replies

anyone have ideas on the most efficient call to have a single voltage input toggle a variable (or an output) between two states. I'm using...

anyone have ideas on the most efficient call to have a single voltage input toggle a variable (or an output) between two states. I'm using GetADC to sense the voltage pulse but I also need to reverse direction of a motor on every other pulse. thanks -s-


Too many numbers

Started by Mikael Karstikko in BasicX12 years ago 2 replies

I have a code thats something like this dim a as single dim b as single call getadc(17,b) a = 0.6 * b - 1.5 after...

I have a code thats something like this dim a as single dim b as single call getadc(17,b) a = 0.6 * b - 1.5 after that a is like 0.62571235712356 ... too long How can i convert it to 0.62 or 0.625 ??? Thanks for any help ! - Mikael


Continuous Loop

Started by outhman82 in BasicX12 years ago 2 replies

I wrote the following code for my BX-24 processor, executed it and it worked fine and now I can't get the board to halt. Option Explicit...

I wrote the following code for my BX-24 processor, executed it and it worked fine and now I can't get the board to halt. Option Explicit Public Sub Main() Const PinNumber As Byte = 13 Dim iV As Integer do WHILE(1=0) iV =GetADC(PinNumber) debug.print cstr(iV) if (iV<5)then Call PutPin(16, bxOutputHigh) el


GetAdc question

Started by Francisco Lobo in BasicX14 years ago 1 reply

I need to reed a pot from basicx to determin its postion, and i need to do this as fast as possible, would you recommend attaching...

I need to reed a pot from basicx to determin its postion, and i need to do this as fast as possible, would you recommend attaching a pot to it and reading its ADC? and if yes, what pot value would you recommend from 0 kohm to --???? Thanks


Expanding inputs

Started by psyclopedia in BasicX11 years ago 8 replies

I've been struggling with this one for a few days, to no avail. I have a bunch of analog sensors that I read with GetADC(). Each sensor going...

I've been struggling with this one for a few days, to no avail. I have a bunch of analog sensors that I read with GetADC(). Each sensor going to a seperate pin. Some of the sensors have voltage dividers in the circuit, some do not. Some are counting pulses, some are reading resistance. Now though, I've used all of the available pins for analog input. So what I'd like to do is use som


Negative numbers in IF - statement

Started by Mikael Karstikko in BasicX12 years ago 1 reply

Hello All ! Once again I am at a loss ... My pressure sensor fluctuates a little so the display shows 0.0 and -0.0 The display should...

Hello All ! Once again I am at a loss ... My pressure sensor fluctuates a little so the display shows 0.0 and -0.0 The display should show numbers between -1.0 to 6.0 bars ... but not the value -0.0 whitch flickers annoyngly .. Why doesn't this work ?? Dim pres as single Do Call getadc(20, pres)


Sensing movement with GP2D12 IR sensor

Started by elle...@hyperisland.se in BasicX11 years ago 1 reply

Hi! I have a GP2D12 IR sensor from Sharp connected to my basicx 24. I get read the signals through getADC on one of my pins. The value I get...

Hi! I have a GP2D12 IR sensor from Sharp connected to my basicx 24. I get read the signals through getADC on one of my pins. The value I get back vary a lot even though there is no object in front of it or even a movement. I want to detect motion in the range of 20 cm to 80 cm so I compare the old value from the new value every second. But this feels very unreliable since the value I get back...


adc to site player

Started by wimn.rm in BasicX12 years ago

I'm reading a pressure transducer and want to send the data to the siteplayer. Can't get it to work. It hangs. Who can help please? ...

I'm reading a pressure transducer and want to send the data to the siteplayer. Can't get it to work. It hangs. Who can help please? Extraction from the program. (compiles ok) Call GetADC (PressPin,PressRaw) hPascal = (pressRaw * 10000.0)/8.0 shPascal = cStr(hPascal) dataByte = &H83 'Funtion WRITE and 4 bytes call


GetADC error and adjacent pins

Started by Tom Becker in BasicX13 years ago 2 replies

I've seen a number of comments that suggest interaction of digital and analog neighboring pins but which offer no explanation nor a...

I've seen a number of comments that suggest interaction of digital and analog neighboring pins but which offer no explanation nor a solution other than reassigning the pins - if that works. It appears that the culprit is sourcing current to digital outs, like an LED. If the pi


BX-24 to a Zettler AZ943 relay

Started by harris_cohen in BasicX13 years ago 2 replies

I am trying to connect a BX-24 to an off-the-shelf driveway motion detector that provides relay outputs (Zettler AZ943 relay) for...

I am trying to connect a BX-24 to an off-the-shelf driveway motion detector that provides relay outputs (Zettler AZ943 relay) for this purpose. The detector comes with no specifications and so my question is how would I go about doing this? Should I use GetPin, GetADC or Pulse


Test for something connected to ADC Pin

Started by Leddy in BasicX13 years ago 1 reply

Is there a way to know if an ADC Pin is "null" or if something is connected to it sending data? I've used GetADC(13) with nothing...

Is there a way to know if an ADC Pin is "null" or if something is connected to it sending data? I've used GetADC(13) with nothing connected to it and still read a result of ~300-350ish Those could be values sent to it from the analog input, so I'm at a loss :(


convert 10 bits to 8 bits

Started by rauseo82 in BasicX11 years ago 2 replies

i am attempting to add memory using an external eeprom. the good news is that i have added the memory and know that it works. the bad news...

i am attempting to add memory using an external eeprom. the good news is that i have added the memory and know that it works. the bad news is i can't get my information onto the memory. the problem is i am reading data from an imu using the command GetADC(pinnumber), which returns an analog voltage in 10 bits. to log our information onto external memory i am using the command Shift