Re-2: write to and read from a hardware address directly, possible?

Stephen Barncard stephenREVOLUTION at barncard.com
Mon Jan 29 12:41:20 EST 2007


Franz,

I didn't say it was impossible, but you'll have to write some XCMDs 
to access special hardware. This would be true in most other 3GLs as 
well.

If you want to try to write an XCMD, check out  Mark Waddingham's 
most excellent article about writing one.

http://www.runrev.com/newsletter/november/issue13/newsletter5.php

<http://www.runrev.com/newsletter/november/issue13/newsletter5.php>NEWSLETTER 
ARTICLE ABOUT WRITING AN XCMD

>Before going any further you will need:
>	*	Revolution 2.7.x (any edition should do)
>	*	Visual C++ 2005 - any edition including Express
>                                             (if you want to build 
>externals on Windows)
>	*	XCode 2.4.x (if want to build externals on Mac OS X)
>	*	The Revolution externals build environment:
>	*	A set of pre-constructed environments for each step 
>in the tutorial article:
>	*	A cup of coffee (not strictly required, but I find it 
>helps when coding in lower-level languages...)

I sympathize, as this was my first complaint when I first touched a 
mac after coming from the super-open Apple II, where all the hardware 
addresses were IN THE BOOK. On the mac, until Hypercard arrived, 
there was no way to get to anything except by using Pascal.

I also understand about the speed issue. Most data acquisition I've 
seen is 8 or 16 bit, and not particularly fast (compared to audio 
DSP, say), so a quick PEEK or POKE command could be quickly created, 
and even with the overhead of going in and out of the API, it could 
be fast enough for most data acquisition.

if you're not up to writing an external, it might be cheaper or 
easier to find some alternative relay-OPTO cards that have drivers 
already made that will talk to your chosen OS. There are MANY out 
there now...

You also might consider controlling and acquiring through the serial 
port using a Keyspan USB adapter. Some systems can acquire on the 
hardware side while streaming to the computer at its convenience.

in 1989 I built a huge cassette controller system using the serial 
port, a hardware chip (cybernetics Cy-233), and hypercard.

<http://www.controlchips.com/cy233.htm>Controller Chip

<http://barncard.com/amstudios/htdoc/Pages/welcome_PP.html>A&M tape 
copy room run with hypercard

this is a big industry. There are scores of companies that make 
acquisition equipment.

sqb


>Hi Stephen,
>
>There are some hardware tasks (f.e. drivers for special PCI cards to 
>manage relais or OPTOIN cards) which need to communicate through one 
>byte in a hardware address. And the status has to be read fast ... 
>As in Perl it should be possible, but not recommended ...
>But it seems not to be possible, because nobody could tell me a 
>solution in runrev.
>
>Thanks,
>Franz
>

-- 


stephen barncard
s a n  f r a n c i s c o
- - -  - - - - - - - - -





More information about the use-livecode mailing list