Cheers, everyone..
I am currently reviewing ericgibbs comments (That will take time)
After reading Mikebits if I think Correct.... By passing the output voltage of the windspeed through a discrete ADC It will then turn the analogue input into a digital binary signal that can simply but read by the porgram at the input port
eg. binarynumber$=Inp(&H378) 'variable is equal to the binary input at parallel port
Then binarynumber$ would = 10110 for example which equates the input voltage of 5 volts say.... If the input voltage changes then the binary number is different....
(Im learning this as I go along so if i've made a mistake then can someone please correct me)
Cheers everyone,
Owen.
Cheers I just realised that..... woops..
even in qbasic would the input figure be a hex value? or would the output from the ADC be binary?
Cheers...
Owen
So I have to write a program that converts HEX to decimal....
thought of a problem the parallel port has D0 - D7 which are the data lines.... If I had an 8 bit ADC, then that leaves no room for any other sensors....
Or is my thinking once again flawed!
Cheers,
Owen.
hi,
The package I posted only uses 4 port pins and it gives you 4 adc inputs.
What you do with the remaining pins is your choice.
Which other 'sensors' do you have in mind.?
What ever you do with an adc input you will need to convert from hex to decimal [ASCII].
This conversion when using VB can been achieved with a couple of lines of code.
That ADC looks ideal, can use it for all sensors, and use remaining 4 bits to address decode.
Won't Qbasic work with hex variables? Why the need to convert to dec?
hi,
The package I posted only uses 4 port pins and it gives you 4 adc inputs.
What you do with the remaining pins is your choice.
Which other 'sensors' do you have in mind.?
What ever you do with an adc input you will need to convert from hex to decimal [ASCII].
This conversion when using VB can been achieved with a couple of lines of code.
using this chip which is capable of four inputs, I can connect these four inputs to the ADC.
But how does chip defien between the different outputs or do I have to basically create four delays to feed the data in individually?
Owen.
Your right Eric, I have been confused, as he first said Qbasic, then vbasic. And by the questions it seems he has not read any of your offered material.
hi,
You asked for examples in VB on how read the parallel port, [using external adc ic's] have you taken the time to read thru the fully working program and interface drawings I posted 2 days ago, its ALL in there if you look.?
I'm really trying to get my head round this.. and as you can tell failing VERY badly,
I've never used ADC's before, I've only started learning Qbasic within the last 2 months, I do however have a habit of pushing on through and getting the end result. The major thing is.. I have nothing to play with, therefore I cant create things and tinker till I get it right...
some of the responses have been great, but still a little too complicated for me.
anyway now thats over.....
From what I understand (ericgibbs' s post 2 days ago with the pictures is now starting to make sense) I need 3 cables going to the parallel port, one of the is the clock so some from of oscillator (crystal for example) the other line is data which comes out of the ADC, the other one is the selector which i guess you Output from the pc to the ADC with a signal that switches the selector switch over....
again thank you for your comments I do take time to read them but sometimes they are a little too over my head therefore I end up asking questions as my knowledge increases that end up have being answered 2 - 3 days ago.
Owen
hi,Hello Ericgibbs,
Cheers for your reply... It may be just me but in the .zip package you sent me i cant find source code, i can open the .exe (all values set to 4.99 which is because i've got nothing connected to the parallel port). I do not have VB installed on my pc ...
I've also spent time really reviewing the .pdf and it makes sense with the Op-Amps to amplify everything
Is there anyway we could move this away from VB5 and perhaps back to QBasic because I thought it would make it easier for everyone..
Its made it easier for you which is great - but unfortunatly looking at the complexity of the system I've realised that it is no longer easier for me....
I've already tracked down a functioning HEX to decimal converter which I understand and can easily tweek...
I'm starting to understand things a little clearer now.. We've done a lot of things to do with outputing in Qbasic including building a DAC, and a light box to light LED's to each of the control lines and data lines (Strobe, init, D0 - D7 etc) However, We have not covered inputing data (Other than the need for buffers)
Thankyou (sorry for being a pain)
Owen.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?