Jump to content

Toastie

Eurobricks Dukes
  • Posts

    3,995
  • Joined

  • Last visited

Everything posted by Toastie

  1. Well, that is not exactly true. The CyberMaster PBrick (CM) has a whopping 396 bytes of free RAM available for storing LEGO byte codes (as the SCOUT has as well). Sounds not that much, but you can do a lot with the CM specific commands and functions! The tacho motors alone are a blast. The easiest way to program the CM PBrick is BricxCC/NQC; TLGs own PBrick control programs can do that as well. The CM RF tower behaves exactly as the serial IR tower for the RCX, SCOUT, Spybotics. All the specifics of the CM PBrick are in the NQC Guide file: I just fired up my CyberMaster PBrick and took a screenshot - this is what I got upon a little analysis run. As you can see, the CM can run 4 tasks and 4 subroutines in parallel. It has 32 (global only) variables. BTW: When the CyberMaster PBrick noticed, you called it a "hub", it played "Hell's Bells" (yes, the built-in sound features are cool!) All the best, Thorsten P.S.: Here is a link to one of TLG's documents - there actually was a time, long ago, in a galaxy far away, when they accurately documented their hard/software stuff: http://www.activevb.de/rubriken/mindstorms/downloads/pbrick.pdf
  2. You mean regarding the PBrick having two built-in motors, sensor inputs, wireless communication, right? The basic concept of programmable LEGO stuff - as with all other microcontroller based technologies way before - has been essentially the same since the 4.5V Technic Control era from 1986: Sensor reading -> input to controller -> processing of input within controller -> output of controller to actuator. And the latter may affect the reading of the sensor and that may be used for setting up feedback loops. Yeah, I know, everybody knows that. And since 3 and 1/2 decades, LEGO line followers are reinvented ... Of course, many things have changed over the past 3 and 1/2 decades [computing power in general; #inputs and #outputs (well, not that much in LEGO world); communication means (cable, IR, RF), protocols, and speed; sensor/ADC resolution, sensor types etc. pp.]. But the concept naturally remains the same. One of the nice things about CyberMaster is that once you learned to play with LEGO byte codes, you knew how to program RCX', Scouts and Spybotics as well. Even better, with NQC you even had a C'ish programming language, which simply translates your code to LEGO byte code. And with BricxCC and IDE, which allows you to monitor CyberMaster PBricks as well as the other PBrcks listed above, even CodePilot and MicroScouts using VLL when you had the LEGO USB tower. The 27 MHz band CyberMaster is using as RF carrier frequency ... was a bit congested back in the days, as no Wireless Communication Police would show up even after blocking the entire 27 MHz band with a 10kW RF generator . Today, that frequency band is mostly nice and clean again - as we even run microwave ovens in the 2.4GHz bands - where BLE is also sending its data packets through the ether. And we switch to 5GHz as it becomes as congested as 27MHz was a long time ago. Best regards, Thorsten
  3. Mind control (https://hackaday.com/2021/05/24/self-driving-or-mind-control-which-do-you-prefer/)
  4. Success! Desoldered the faulty 40 pin Yamaha chip, soldered in a 40 pin socket, popped on the working chip - and - works So on to the video ... I suck at taking videos, though. Best, Thorsten
  5. Of course, you can! You know how many totally silly and totally irrelevant (to the Uninterested) "certified world records" there are recorded in the annual Guinness World Records book or on their website? OK this is not certified - but hey, this is fun! I enjoyed it! And they're saying "... so for now we're claiming the record." Yeah, why on Earth not? Take all your LEGO flower elements you have, put them on a trailer, and claim, for now, the record. What is wrong with that? Nothing! It's called having fun. I cite from one of my favorite movies: https://movie-sounds.org/war-movie-sound-clips/quotes-with-sound-clips-from-kelly-s-heroes/oh-man-don-t-hit-me-with-them-negative-waves-so-early-in-the-morning Congratulations guys, I did not find anything either - 72 meters - WOW! Best, Thorsten
  6. Hmmm - all difficult: 1) Tough to fire a company, particularly one that ceased to exist in 1945. Or make it 1969 when they dissolved into MBB. 2) Rudolf Blohm - dead; Walter Blohm - dead; Ernst Voss - dead (well, they founded B&V in 1877 ...) 3) That plane did fly for the first time in 1938 ... What I like though that you made me find this thread from 2015 - otherwise I would have missed it. Love that build!
  7. I boldly agree to your assessment, without >any< harsh feelings on this now "growing up generation" - they acquire other and more relevant skills in the world developing on their growing up. Every poll is - as you said - naturally "skewed". You can come up with as many rules as you want; it will remain skewed. More or less. Homo sapiens (sapiens) sounds good, but after all, the time to develop educated skills for an "unbiased poll", was - and will be for a long time - a little short. Best wishes, Thorsten
  8. That'll take some more time than originally planned - yesterday I fried 2 of the 8 IO ports of the Ataris's Yamaha sound+I/O chip: "Thou shall not" ... connect a ribbon cable the other way around to the outputs of a parallel port driven by a 40 pin I/O chip". Particularly when there are additional shorts caused by sloppy soldering But: The financial department here (=my wife ) cleared the acquisition of a rather cheap desoldering station as well as the purchase of 2 used but functional Yamaha chips ... Will try (very hard) to get back to #8bitisbetter behavior, for example: "Thou shall not hot-plug on ancient computers" Best, Thorsten
  9. Thank you very much! The 1x tiles have anti-studs with an indent slightly smaller than 1.5 mm. I use these as a guide for a 1.5 mm drill (on my drill press) to drill "pilot" holes. Turning the tile around, I try to scratch mark the position of the hole in between two pilot holes with a sharp wood piercer(?), once it looks OK, I pierce a little more, then take that mark as pilot for the 1.5 mm drill again. Last step is widening the 1.5 mm holes with a 3 mm drill (for the 3 mm LEDs). The drills (for metal) have never seen metal, only ABS and wood. [BTW: The drills in that box are really sharp; I thoroughly checked that by (OK, sort of accidentally, but still idiotically) drilling into my left index finger using the 8.5 mm drill. Yes, sharp the thing was. But: A small piece of wipe paper, some duct tape and a bottle of beer ensured that I could proceed with my project ] Best, Thorsten
  10. Hi Evan, I studied the schematics of the Sinclair ZX Spectrum a bit and read some moldy magazines (the original paper versions, 1983-1985). It turns out that 9771 with the help of a custom cable (Spectrum female card edge connector to female ISA BUS card edge connector) with no further electronics needed, should work well. All you have to do is getting the two connectors, solder that cable and that's it. As I don't have another 9771 (and don't want to get that one card I have off from my XT), I can't try this almost pure LEGO approach. Would have been funny though when TLG had put 9771 into a slick (empty) black ABS box and then sold it off for crazy amounts of money to schools. The native Spectrum BASIC has the command "OUT address, byte" and the function "byte = IN address". So we're all set. Best, Thorsten
  11. From breadboard to perfboard I just finished cleaning up the mess around 74LS273 on that breadboard - by putting it on a perfboard and do some soldering. The Atari 9750 parallel interface (left) has now a similar shape as my serial 9750 interface (right), I tried to (very, very) remotely give it an Atari-ish shape: As Atari (ST) cases appear to age nicely over the decades (the ST I am using was born in 1987, at least the PCB says so) - others call it yellow/ing, same thing that happens to mostly white LEGO pieces - I thus chose tan bricks and plates to sort of match that The top cover is pure 999 Gold - these are tiles from the MK Flying Dutchman stand I did not find any use for, as my FD is plowing through LEGO water up here in the attic . These are the parts used - and yes, I did some cutting, otherwise a snug fit of the board, so that the cables (to 9750's port and to the Atari's parallel port) can be securely attached/detached, is tough to achieve at this scale: Left: Interface partly assembled. Right: The light attachment is for trying things out, which don't need 9750. I did not include the two input/sensor LEDs, as it was already a pain in the butt to get the 6 output LEDs in there. Furthermore, the inputs of the interface require TTL voltage levels, so that e.g. the TC light sensor won't function at all. Left: Front view [power is 7-25V DC, 9V, 10V, and 12V LEGO DC power supplies work well; 11 ribbon flat cable (STR#, D0-D7, GND, BUSY) that goes to the 25 pin parallel port of the Atari]. Right: Back view (either the LED attachment is plugged in or the 20 ribbon cable that comes with 9750) The interface with LED attachment: Some very short video showing the interface in action to follow. Best regards, Thorsten
  12. Heavens - this should not be anywhere near a dilemma ... you are selling Marvels of the Universe ... and $400 is a very low price! I believe a bit more of advertising may help? Pictures of the content (I guess the boxes are "unopened" - no need to do that, as we apparently have video?), some nice words about each item? And then: Maybe telling folks the prerequisites for running that incredible stuff? Yes, we are in a very well-educated LEGO forum, but when going that much back in time, the set numbers alone - I believe - may not make that much sense even here. I may be very wrong on this (sorry folks!!!) but this stuff was sold to schools and was hardly available to the average LEGO customer. When you google the numbers, not that much of "trusted content" shows up. I'd - as said - would advertise a bit more, and graphically. After all, 9771 is pure Unobtainium. 9750 is on BL for $50 (EU, only 2 items!!!). 9700 for $100 (US, only 1 item); all + S&H. Again, your offer is very reasonably priced! I asked around in my university today - not much of a response; the folks I work with are all weird chemists - they believe that ABS is a bit outdated. In my research group, they believe everything before 2000 is - Tomb Raider stuff. The physicists - well, are physicists. The don't even have a remote idea regarding element 42-4 in the Periodic Table.: Unobtainium. I will push on. Sorry that I failed so far. All the best, Thorsten
  13. I absolutely don't think you have broken a taboo. For one, there is a more than 35 forum pages long CADA thread right here in this forum. Secondly, for heaven’s sake, all you have done is looking around for what competitors have to offer. In a capitalistic world!. People keep telling me that >competition< is the best driver in that world and makes everything better. So, when I want to buy a toaster, I don't buy the most expensive (but still relatively small) toaster on the planet - only if that one can do so much more or better than the competitors' toaster can. In the toaster industry, all critical roasting and toasting patents have since long expired - it is the same thing with the plastic pieces we are discussing here. So no, what you have done is the most natural thing in this world. Are you alone? Certainly not. If you want to speak openly, just go to the community forum and check for folks who did, do, and will continue to do so: See with open eyes what is out there. It is entirely up to you. And when asking for $650 you know what? I'd look around A LOT. If this cannot be discussed here, then I don't know ... Best, Thorsten
  14. Yep. It appears to be an essential part of the GoG (game of grift ) Best, Thorsten
  15. @evankChecked about prices - these 8 bit beauties sell for high prices, so I am out of the game (apart from the Speccy, of course). Also checked with the Atari Gurus on their forum - they said, nothing is wrong with the circuit I posted above. I'll make a little perfboard version of the Atari interface just to have the two (Arduino and 74LS273) ready to go. Need the breadboard for other stuff. Best, Thorsten
  16. Uhmm - I never thought they were gifts but the usual "for free" thing, did I get that wrong? The "Get one - get one for free", "25% off if you purchase 2", or "the GWP will make you rich beyond your wildest dreams" (OK, heavily copied from GB, the original, of course). Thorsten
  17. I believe it is helpful for the challenge to get a notch more specific ;) Googling "800" does tell you a lot of interesting things - OK, we are in an Atari thread - so this yields "Atari 800" () but also Atari 800 XL ... which to choose from? The TRS-80 also comes in a rather interesting variety - do you have a specific system in mind? Altair ... 8800 I guess, right? There are so many versions ... Do you own (or have access to) any of these? Best, Thorsten
  18. @evank Thank you! That is much more than I hoped for! This challenge is really motivating. I sure hope there will be more entries. @alexGS has many ideas/proposals - and I am sure - solutions. And surely others as well. And thank you very much for setting this up, and foremost, documenting any progress in this regard on your website. All the best, Thorsten
  19. Hi Brian, what a nice find!!! And Aaron must be soooo excited and totally in LEGO heaven ... Thank you very much for sharing! All the best, Thorsten
  20. OH - DAMNED!!! I missed this one - guess too much vintage I am doing. Super-nice instructions of how to power-up the 9V train regulator!!! You certainly know that @Haddock51 has done something similar - but as far as I remember there was not much information available on how it actually was done. I totally agree: Forced cooling - in this case by air flow - really makes a difference. Very nice, I enjoy(ed) everything you did - from making the thing(s) to presenting them! All the best, Thorsten P.S.: It is so clean, all so clean. Yes, I know, for the photo-shooting, but. Nice. I love the heat shrinking tubes. Makes me blush - my stuff always looks like a total mess. It works, but it is a mess. How much nicer seeing your solutions. Much in line with LEGO!!! I love it.
  21. Well, I do. And did practice with first-graders visiting my research group. Was fun. You are right: It takes (much) more than 5 minutes to get a robot rolling and do a dance. But maybe that is one of the reasons, our school system "degrades" - or better: "shifts" - to training other skills than math, physics, engineering ... today it is more about learning to saving time (for whatever activity), to plug-and-play, using cell phones ... but again, that's OK, as today, the world is spinning that way. Nevertheless, I so often hear whining and complaints about missing math and science skills; it appears though, that these skills are as easily acquired as they were back in the days, when time is not ticking away that much faster as it did back then. As you know as well, "RCX" is much more than learning "programming". It is about wiring, parallel, in series, about what happens when a 9V lamp is put onto a 9V motor, and you spin the axle by hand ... etc. "RCX" had many "challenges", tips, hints, books, programming examples, themes, and that little remote allowed you to do entirely without programming. But once again, I know that this is back from the days, outdated, old-school, not cool ... from a grown-up's perspective. I do know from experience that you can still catch the attention of young folks with these historical devices. I also love these very old photographs in the History of Mindstorms thread of @Coder Shah showing very young people operating a turtle robot via cables and a program consisting of lines of LOGO text. Yes, 6 years is too young for that stuff - but wiring is not. I find it much easier explaining to a young person, that "electrical current", whatever that means to them, is flowing from "the thing" to the lamp or motor through one of the two wires and back through the other. And when you turn around the terminal, the lamp is shining as bright as before, but the motor spins the other way around ... man, they really freaked out, that was fun. But again: When you focus on "programming" then BOOST is the modern way to go. The robot you build - is almost always the same since 30+ years of LEGO robot (or turtle) building. It all (still) depends, I guess. Best, Thorsten
  22. Oh yes, I totally agree. Maybe go further back in time: RCX. 9V System. The world of wires, trains, machines, controls ... I know: Pain in the butt to get all the components. But you can get them for almost "nothing" in the rich men's world (heck, the 1.5 RCX sells for <10 bucks on BL ...). And then there is getting the software. But it is all out there. When you want to learn "sensor-software-actuator processes", 9V is the way to go. Well, LEGO Technic Control (4.5V) is really nailing it, but that's another story. When you want to experience the >modern way< of >wireless< (as this is what it is about) pair and play, then go for PoweredUp or Spike or what ever. Best, Thorsten
  23. OK, I have to admit, I read your post with some - no with a lot of joy. But I would rephrase that piece of text as follows: Obviously TLG is run by a bunch of greedy scum bag capitalists. Why? "Obviously" becomes obsolete, as "greedy" + "capitalist" is like a "black rap". "scum bag" is well, again a black rap in this context ... Other than that: Yes. I agree. Don't know about IP infringement rights in this case, the internet is essentially "open source", I do know though how low, how very low TLG's approach on this documentation really is. @kbalage: Your website was so much better. In every regard. Best, Thorsten
  24. OK, full report is out in the Mindstorms Forum. No, I meant the Technic Forum, of course . Cross posting is strongly discouraged on EB, so I leave it with the link to that thread as it will drown there in a couple of hours So this is my second entry for the challenge! More importantly: When rummaging through my salvaged electronics parts and pieces, I found this: As all of you know, this is a ZX Spectrum main board connector - in MINT condition! I have two Spectrums and did quite a bit of programming and made hardware additions for them back in the days, some 35 years ago. And recently ... so now that the Atari is done, I am considering to get one Speccy in touch with 9750. On the connector, there is everything: Address, data, control lines, power ... and I do still speak a bit of Z80 assembly ... hmmm. The Speccy has a totally messed up address management, but that is so well documented, I'll find two unused I/O addresses ... TLG endorsed system, as per @evank are: Apple II (CPU: MOS 6502, 8-bit) BBC Micro (CPU: MOS 6502, 8-bit) Commodore 64 (CPU: MOS 6510, a variant of the 6502, 8-bit) IBM PC (CPU: Intel 8086, internally 16bit, with 8-bit data bus) Philips P-2000 (CPU: Zilog Z80, 8-bit) How many other non-LEGO endorsed systems from < 1992 were used for that purpose? I have added the Atari ST to this list, what else is there? There must be so many! The ZX Spectrum would be Z80/8 bit as well. Atari 1040 STFM (CPU: 68000, internally 32 bit, with 16-bit data bus) All the best, Thorsten
  25. Dear All, strongly motivated by Evan Koblentz’ (@evank) “9750 LEGO Interface A hacking challenge” announced here on EB (https://www.eurobricks.com/forum/index.php?/forums/topic/195711-a-challenge-lego-9750-interface-a-hacking/), I wandered into the Atari ST world, looking at the ST’s hard- and software for the first time in my life – never had the chance to play or work with one of these beauties back then. Found three of them in “the basement” of my research institution’s labs, and one of them worked flawlessly (the other two need a little attention, as they throw bombs when booting up). Executive summary As already briefly “announced” in the referenced challenge thread: I managed to get the Atari’s “a-bit-special” 8-bit parallel port (it is fully bi-directional, but has only two control lines, strobe, STR#, and BUSY) with the help of just one (ancient) 74LS273 TTL chip, some resistors, and a 5V power supply, to operate the 9750 LEGO Interface A from 1986/7. This is a brief write-up of how I found out how the I/O hardware protocol of the Atari ST works, when using GFA BASIC 3.0 as programming language (1988). GFA program(s) and interface schematic are here: https://bricksafe.com/pages/Toastie/atari-st-and-9750. Video to follow, I am running a little short of time at the moment. Here we go, another long vintage LEGO story … According to the three challenge rules, Evan posted in the above referenced thread, namely Use any computer and any programming language you like, as long as it was for sale in 1992 or earlier (as the next-generation 9751 / Interface B debuted in 1993.) Don't use any add-on hardware that was not available back then. A breadboard is fine; an Arduino is unacceptable. It's okay to run emulators if you do not have original machines, but you can't use any additional features that did not exist back then. You can use Windows 1.0 or 2.0, but not 3.1 libraries, etc. I became very happy after reading that, as an Atari ST qualifies as a legit computer system in this challenge! My ST is from 1987 - and it features a parallel port - which gave me hopes that I can probably get this >68000 CPU loaded 32-bit power machine< (running at 8 MHz CPU clock speed with 1Mbyte of RAM available!) to controlling the 9750 LEGO Interface A. As Arduinos and the like are not allowed for interfacing, nor using any hard/software produced after 1992, I was dreaming of TTL world, as I did when I was more than 35 years younger. What did I have at my disposal for coming up with an Atari interface (that also met the three rules of the challenge)? An Atari 1040 ST(FM) (1987) with parallel and serial port GFA BASIC 3.0 (1988) with access to serial, parallel, and MIDI ports A good number of TTL chips saved from being trashed; they all date back from the 1980’s Soldering gear, an oscilloscope, multi-meter, bread board, resisitors, LED's … I began initial programming using the ST’s serial port. After all, I first had to learn GFA BASIC, and how GEM works, and so on, and so on. Never used an Atari before June 2023. I more or less “copied” (well typed in) my working DOS QuickBasic routines controlling 9750 on an IBM XT (https://bricksafe.com/pages/Toastie/lego-interface-a---9750---9771---tclogo/program-files-) into GFA BASIC – with – “some” limited success. The thing is, the Atari’s serial port has I/O buffers; the IBM XT has not. When garbage accumulates in these buffers, my Arduino “protocol” is seriously screwed up. This “protocol” does this: Send a byte to the Arduino over serial (RS232) or UBS and then immediately listen to the reply. After conversion to parallel on the Arduino, the sent byte sets the 6 outputs of 9750; the Arduino replies back the output states of 9750 in addition to the two sensor input states. This is the protocol (send and immediately receive one byte) TLG used on the IBM XT with the LEGO 9771 interface card as well, and (I believe) on all other LEGO endorsed platforms also. It turned out that the two GFA BASIC functions "boolean=OUT?(port,byte)" and "boolean=INP?(port)", which are replying the status of the ports as FALSE=busy or TRUE=available, did not really work as expected using the serial port (AUX: or “1” in GFA BASIC). In a hardwired “client/server” setting (client=Atari, server=Arduino), it is all about initialization. Once that is done, nothing much can disturb the communication other than programming errors. In other words: Whatever garbage is in the serial out buffer upon startup: just dump that. Then do the “LEGO style initialization process”: OUT 1,bin0010101; var=INP(1); IF var AND bin0011111=bin0010101 then hardware is present and works. And that worked very well on the Atari; 9750 was controllable with an Atari ST via its serial port with the help of an Arduino Nano as serial2parallel converter. SUCCESS!!! BUT, BUT, BUT: CHALLENGE RULE #2 says: Don't use any add-on hardware that was not available back then. A breadboard is fine; an Arduino is unacceptable. !BUSTED! Well, back to the drawing board. Atari forums and other websites note: The parallel (LST: or “0” in GFA BASIC) port of an ST is somewhat “special”: It lacks some control lines most printer ("Centronics") ports and parallel printers featured back in the days, such as an acknowledge (ACK) line, among others. The ST’s parallel port has (only) a “strobe” (STR#) and “busy” (BUSY) control line, the eight bit D0-D7 lines, and ground. That was good enough for most 1980’s printers, so in essence all was fine … Much more importantly, you can write to AND read from the parallel port using ALL 8 DATA BITS! WOW! As there is no reason to read the 8 bits from a printer, these Atari folks had certainly something else in mind than just printing from the parallel port. Third: Data copied to the parallel port are “transient” of nature, as the Atari operating system uses the 8 in/outputs for other purposes as well, according to Atari forums. And the internet tells you: Fast parallel data exchange via the Atari parallel port possible, using special cables, protocols, hardware, and software. What to do with that rather confusing information? Not much. Well, what did help me, was getting hold of the Atari ST PCB schematics, breaking out my good old Tektronix oscilloscope, solder/crimp a 25 sub-D connector style parallel cable (using only 11 lines: STR#, D0-D7, BUSY, GND), run GFA test programs, and poke around a bit with the two oscilloscope probes ... It quickly turned out that the Atari sends out data over the parallel port when using the GFA BASIC “OUT 0,byte” command only when BUSY=LOW. That is fully in line with the early Centronics “compliance mode” protocol: Check the BUSY=LOW condition, when that is/becomes true, put data on the data bus, assert a HIGH,LOW,HIGH) strobe (STR#) pulse of some microseconds length (Atari: 100 us), on the negative STR# slope, data are clocked into the printer, which in turn asserts BUSY=H, and when ready again, asserts an ACK LOW/HIGH/LOW pulse and then pulls BUSY to LOW again. The Atari however is lacking the ACK line; if BUSY is HIGH (=device not ready, see below though! This changes later to: BUSY=HIGH=external device ready for providing data and BUSY=LOW=external device ready for accepting data), it waits some 30 seconds and tries again before eventually timing out. The schematics of the Atari ST reveal that it’s parallel port is operated bi-directionally by the Yamaha YM2149 “sound chip” – but that chip it is much more than that: It features, among other things, two 8-bit wide I/O ports, one of which is used for the Atari parallel port; STR# is provided by one line of the osecond YM2149 I/O port, BUSY is connected to input “I0” of the Atari’s 68901 multifunctional peripheral chip. Note that the BUSY line is literally “bolted” to +5V via a 1kOhm resistor – pulling it LOW (< 0.8V!) needs a solid TTL LOW signal. All lines of the two I/O ports of YM2149 are internally pulled-up HIGH; according to the YM2149 datasheet with 60kOhm minimum resistance – here a grounded 4.7kOhm resistor should be OK to get below 0.8V = TTL LOW – 2.2kOhm should be on the safe side. Next step: Testing GFA BASIC simple input/output testing routines and record changes in the STR# and BUSY lines. BUSY was clamped to LOW and repeated OUT(0,byte) write data attempts in a simple for-next loop were performed: Worked fine. The oscilloscope trace of the STR# line is depicted schematically in panel A), top trace, in the figure below. All seems to be in line with the Centronics protocol. Check! Performed INP(0) read data attempts with the same setup – but nothing happened! Program froze up immediately, no break (CTRL+ALT+SHIFT) was possible. However, simply removing the LOW clamp from BUSY and letting it “float” (well, see schematic above, it is pulled-up via 1kOhm to +5V = HIGH) reanimated the program >instantaneously< and the upper trace in panel B) was recorded when repeatedly reading the data lines with INP(0). Check! But then … … I thought “strange” … when does the presumably negative slope trigger on the STR# line for OUT (according to the Centronics protocol) “transition” to a positive slope trigger for INP? It did not make much sense. Google was also not helpful, even after hours of searching. Which left me with: Trial and error. I love trial and error. At some point, I arbitrarily connected STR# and BUSY – did not work either, program froze again up. When trying repeated OUT commands that is. As said: Deep in trial and error territory I was. However: In retrospect, this could of course not have work but revealed the following: When turning the computer on, loading GFA BASIC, running the program, the first OUT command worked, a second did not. The oscilloscope showed: Initially (STR# + BUSY) = L. And then OUT works??? What??? This means, that a >positive< slope of STR# is supposed to clocking the data into the external device! Not the negative slope, as the Centronics protocol suggests. After the first OUT command, (STR# + BUSY) = H, so a second OUT cannot work. But an INP should – and did! After that step, (STR# + BUSY) = L again, and another OUT works etc. This also means that INP reads data on a >negative< STR# slope. The trace on the oscilloscope obtained with repeated OUT/INP loops are depicted in panel C) in the figure below. At that point, the “rules” for operating a dumb device (dumb=providing/having no control lines) >bi-directionally< using the Atari’s parallel port became rather clear: STR# + BUSY = LOW on initial OUT/INP sequence. This is straight forward: Gather the status of BUSY using OUT?(0); if FALSE then BUSY is H; if so, do one byte=INP(0) and simply dump returned byte; now BUSY=L and “endless” repeated OUT/INP sequences can be done: As the OUT data are “lost” on the parallel I/O lines at some point (according to the Atari forums after a few ms), and at latest, when reading the lines with INP, they need to be latched on the >positive< slope of STR#, see above. TLG used transparent 8 bit D-FF TTL latches with tristate outputs (74LS373) on their 9771 card. This fancy approach is not possible here, as there is are no dedicated IORead# and IOWrite# lines available, there is only “one” line (STR#=BUSY) for clocking data in and reading them out. For that purpose 74LS273 is a perfect match: 8 non-transparent D-FF TTL latches, having always logical defined outputs (L or H); all logical levels at the 8 D inputs are latched with a positive TTL slope at the CLK input and immediately show up on the 8 Q outputs. A negative slope at CLK does nothing, so when reading data with INP(0), nothing happens to the 8 Q (output) states of 74LS273. As all this is securely happening “behind” an I/O chip (YM2149) and not directly on the CPU’s data bus, and as we know that there are 60kOhm pull-up resistors on each parallel port data line, we can use a dirty trick to feed-back the Q output states of 74LS273 to its D input lines via 2.2kOhm resistors: In output mode, YM2149 easily drives the D inputs of 74LS273 to H/L, even when the corresponding Q outputs are L/H; the 2.2kOhm resistors prevent any harm: The maximum current flowing, when D=H and Q=L is 5V/2.2kOhm = 2.2mA. Each output of 74LS273 as well as each output of YM2149 easily sink/source that current (BTW, 10kOhm feedback resistors don’t work, as the voltage on the D line does not drop to or below 0.8V when Q is L. The YM2149 does not know what to do with such a voltage; it simply says it is still H, as tested). This approach of using resistors within the 8 data lines between an external device that can read and write and the Atari’s parallel port as security measure is widely known in corresponding websites and forums, see for example here: http://info-coach.fr/atari/hardware/interfaces.php#if_parallel. Finally: The two sensor lines of 9750 are routed to the D inputs 6+7 of 74LS273; on each OUT/INP sequence, the corresponding Q6+Q7 data become available to the program running on the Atari: The OUT command clocks the data in, the INP function reads them in (in addition to D0 to D5). And that’s it. Here is the schematic for the “interface” (= one 74LS273 + 8 x 2.2kOhm resistors + 5V power supply, which is not that much of an “interface” …). +5V power may be obtained from the Atari main board (this is a bit on the invasive side) or from any generic +5V power supply. Shown in the schematic is a stone-old 7805 regulator, which can be fed with DC power from +7 up-to +25V, +12V recommended. The LED’s are purely optional; with them you don’t need to connect the 9750 interface A but will have the same light show ;). The 1uF/10kOhm RC combo on the RES# input of 74LS273 ensures that it does not arbitrarily “flip flop” during power up. The very old TTL “trick”, I know. Also optional – upon initializing the parallel port, all is fine. In that case, just connect RES# to +5V. And here is the tidy, very organized and (or better but ...) working breadboard version of the Atari parallel I/O interface for controlling LEGO Interface A. As far as I know such a thing does not exist - correct me if I am wrong though!!! More on programs I am using for controlling 9750 per key clicks or per “user programs” in subsequent posts in this thread. All the best, Thorsten
×
×
  • Create New...