Jump to content
IGNORED

1 wire network with an Atari 8-bit


dneedham

Recommended Posts

I apologize in advance if this has been discussed prior, I searched the forum but didn't find any information.

 

My question is: has anyone experimented with these 1-wire network devices? They run through a serial port and look very handy for weather stations etc. I am attaching a couple of links to some information about them. I am looking at a programming project with my son on our 130XE and thought building a weather station and having the Atari monitor it would be fun.

 

http://www.hobby-boards.com/store/pages/1%252dWire-Basics.html

 

http://www.hobby-boards.com/store/products/1%252dWire-Serial-Adaptor.html

 

http://www.hobby-boards.com/store/categories/Weather/

 

My coding skills are not great, so it will be a learning process for both of us. Not sure what language to use to code the project either. Not even sure if we should use an 850 interface for the serial connection, or if using a joystick port would be easier. Any thoughts or suggestions would be appreciated.

 

Thanks,

 

Darren Needham

Andover, Ks.

  • Like 1
Link to comment
Share on other sites

The website doesn't have much info regarding interfacing. Could be that it's by serial data without start/stop bits, which Pokey can't handle on it's own.

No mention of speed either, could be at such high speed that it can't be handled. But given the nature of the equipment it's not like lots of data gets thrown around so maybe it's low speed.

 

If this gear can hook up and work through the 850 then maybe some/all comms could be done under Basic.

 

Otherwise Assembler would be needed for a fair amount of the comms stuff. If bitbanging through the joystick ports then definately so.

Link to comment
Share on other sites

I cant help you very much but just give you some info I've seen other places. I had a friend whose Dad connected a seismograph to his 800 to watch for geological disturbances (he actually got a reading from the Mt. St. Helen's eruption on the East Coast) - he also then hooked up a space antenna to listen for ET (found nothing).

 

Both of these were through the joystick port and some basic/asm code to collect the data. He left his 800 on 24hrs a day for years with no problem.

 

I believe someone here also used an 800XL to control a Pinball game. I believe it was done in basic at first but not enough things could be controlled at once so I think this was changed.

 

If you are doing something simple I bet you could do your polling/reporting through basic and a joystick interface.

 

My $0.02

  • Like 2
Link to comment
Share on other sites

I cant help you very much but just give you some info I've seen other places. I had a friend whose Dad connected a seismograph to his 800 to watch for geological disturbances (he actually got a reading from the Mt. St. Helen's eruption on the East Coast) - he also then hooked up a space antenna to listen for ET (found nothing).

 

Both of these were through the joystick port and some basic/asm code to collect the data. He left his 800 on 24hrs a day for years with no problem.

 

I believe someone here also used an 800XL to control a Pinball game. I believe it was done in basic at first but not enough things could be controlled at once so I think this was changed.

 

If you are doing something simple I bet you could do your polling/reporting through basic and a joystick interface.

 

My $0.02

I would have liked to see the space antenna. Listening for ET is always cool.

Link to comment
Share on other sites

If you're interested in weather stations you may

also be interested in the WEFAX in Antic Magazine Volume #5 Number 5 September '86.

You can download the PDF version here.

 

http://www.atarimania.com/atari-magazine-antic_20.html

That is the one of the inspirations for this project. I remember getting that Antic back in '86 and typing in the weather program. I was really fascinated by the WEFAX system. The idea of getting satellite information to display on my 800XL was incredible. I think I was 16 when I typed in that program. If I could have afforded a shortwave I would have built it. When I got my 130XE here about four years ago, one of the first things I investigated was whether the WEFAX system was still up. If I remember correctly, is shut down in the late 90's with the onset of internet etc.

  • Like 1
Link to comment
Share on other sites

The NOAA satellites are still up and running on 137 mhz, plus you can still get wefax on the shortwave bands too :)

I stand corrected. I may have to build that interface after all. I really thought I read the government had decided to stop the transmissions awhile ago. Glad I am wrong :)

 

http://www.navcen.uscg.gov/?pageName=HfWxNotice

  • Like 1
Link to comment
Share on other sites

That is the one of the inspirations for this project. I remember getting that Antic back in '86 and typing in the weather program. I was really fascinated by the WEFAX system. The idea of getting satellite information to display on my 800XL was incredible. I think I was 16 when I typed in that program. If I could have afforded a shortwave I would have built it. When I got my 130XE here about four years ago, one of the first things I investigated was whether the WEFAX system was still up. If I remember correctly, is shut down in the late 90's with the onset of internet etc.

That is funny. When you said weather station, it reminded me of that antic magazine that was dedicated to a weather station. I was 17 when I typed in that program. I am 45, now.

I recently saw all the online pdf books and magazines for Atari and decided to buy an 8-bit computer and I picked up on the programming quickly. I always wanted to program in assembly language, so that is what I am doing, now. Kudos!

Edited by Flash Gordon
  • Like 1
Link to comment
Share on other sites

Just some off the cuff ideas...

 

If it's really the 1-wire protocol as used in the Dallas semiconductor products, then the interface is straightforward. You may have already thought of this. If it were me, I would use an Arduino Uno or something similar as a separate processor to do all the complex timing and interfacing with the sensors. It can also pre-format / parse / validate the data before sending on only good data in a plain-text or some kind of simple message format to the Atari over a serial data link (like SIO).

 

Advantages for using the Arduino:

- Already-written and tested libraries for 1-wire, basically everything is done for you, lots of examples available, very simple.

- Highly programmable - pretty decent IDE given what it is.

- You can build the entire thing on its own and have it print the data to the debug serial port which will show up on your PC. This makes it easy to debug your parsing.

- Much faster processor for performing 1-wire interface and data validation

- Very easy to interface the Arduino's 5V level serial port (hardware UART) directly to the Atari's SIO port.

- Cheap - I just bought one for $17.95 (+shipping) from Amazon.

- Great learning project.

- Modular - you can debug the sensor interface and get that working independently of the GUI programming on the Atari.

 

Disadvantages (potential at least):

- How well do you know C and/or C++?

- Somewhat more complex project because you now have an intermediate message protocol to invent. But it can be simple.

- You need to figure out how to read/write data to the SIO port - what would this Arduino look like? An 850 interface?

- Or would it instead need to connect to a joystick port and bring associated complexities.

Link to comment
Share on other sites

Looking further into it, maybe the Atari could do it without help.

 

An external microcontroller might also be a good idea - possibly it could do the polling and on regular intervals transmit to the Atari... Interrupt or Proceed line on the SIO port could come in handy there, it's purpose was for this sort of thing.

  • Like 2
Link to comment
Share on other sites

Just some off the cuff ideas...

 

If it's really the 1-wire protocol as used in the Dallas semiconductor products, then the interface is straightforward. You may have already thought of this. If it were me, I would use an Arduino Uno or something similar as a separate processor to do all the complex timing and interfacing with the sensors. It can also pre-format / parse / validate the data before sending on only good data in a plain-text or some kind of simple message format to the Atari over a serial data link (like SIO).

 

Advantages for using the Arduino:

- Already-written and tested libraries for 1-wire, basically everything is done for you, lots of examples available, very simple.

- Highly programmable - pretty decent IDE given what it is.

- You can build the entire thing on its own and have it print the data to the debug serial port which will show up on your PC. This makes it easy to debug your parsing.

- Much faster processor for performing 1-wire interface and data validation

- Very easy to interface the Arduino's 5V level serial port (hardware UART) directly to the Atari's SIO port.

- Cheap - I just bought one for $17.95 (+shipping) from Amazon.

- Great learning project.

- Modular - you can debug the sensor interface and get that working independently of the GUI programming on the Atari.

 

Disadvantages (potential at least):

- How well do you know C and/or C++?

- Somewhat more complex project because you now have an intermediate message protocol to invent. But it can be simple.

- You need to figure out how to read/write data to the SIO port - what would this Arduino look like? An 850 interface?

- Or would it instead need to connect to a joystick port and bring associated complexities.

That is some great info. I actually hadn't look at the Arduino as part of the solution. I will do some more investigating. I picked up an 850 off of eBay last night thinking that would help facilitate communication between the 1-wire network and the Atari. Thanks again for the insight. More research it is!

Link to comment
Share on other sites

I think I am going to purchase the serial port adapter, 4 port hub, power injector, and one temperature sensor. I will then try to create a proof of concept project and see where it goes from there.

 

http://www.hobby-boards.com/store/products/1%252dWire-Serial-Adaptor.html

 

http://www.hobby-boards.com/store/products/4-Channel-Hub.html

 

http://www.hobby-boards.com/store/products/Universal-AC-Adaptor.html

 

http://www.hobby-boards.com/store/products/Temperature.html

 

I found a schematic of a serial adapter here:

 

http://datasheets.maximintegrated.com/en/ds/DS9097U-DS9097U-S09.pdf

 

There will be a steep learning curve to get my coding skills to where they need to be for this project. It should make for a fun, father / son project. :)

 

Link to comment
Share on other sites

You mentioned the steep learning curve. I wanted to point out a few potential pitfalls that you might overlook. Going with a prepackaged solution does have the benefit that you do not have to debug the very low-level protocol which is non-trivial. Now, you didn't say what your background is or what kind of equipment you have at hand.

 

The arduino solution would be cool, but cooler still would be one that has the atari doing the lifting. From what I know of the protocol it should be possible.

 

Possible yes - realistic and acheivable? Maybe, maybe not, depending on skill and experience doing similar. Do you want to spend your time debugging the protocol or writing the higher level application? If you like the idea of this then go for it. I have made my preference above which is to go with the microcontroller approach.

 

In my opinion using an offboard processor is following in the Atari model where you are creating a smart peripheral. So that's a matter of your choice.

 

 

I think I am going to purchase the serial port adapter, 4 port hub, power injector, and one temperature sensor. I will then try to create a proof of concept project and see where it goes from there.

 

http://www.hobby-boards.com/store/products/1%252dWire-Serial-Adaptor.html

 

http://www.hobby-boards.com/store/products/4-Channel-Hub.html

 

http://www.hobby-boards.com/store/products/Universal-AC-Adaptor.html

 

http://www.hobby-boards.com/store/products/Temperature.html

 

I found a schematic of a serial adapter here:

 

http://datasheets.maximintegrated.com/en/ds/DS9097U-DS9097U-S09.pdf

 

There will be a steep learning curve to get my coding skills to where they need to be for this project. It should make for a fun, father / son project. :)

 

 

Edit: I was too hasty and missed that the serial adapter has an interface chip inside it. So you can drive it at 9600 or 19200 from the Atari 850. Also the 850 has 4 serial ports so you could treat that as a hub (with multiple serial adapters though).

 

You don't really need a hub unless you are managing a lot of sensors. Interfacing to a small number of sensors, you can just daisy chain them similar to Atari SIO. I would instead of buying the hub, add another sensor or two. Or save money and just delete the hub.

Edited by Arcanis-Will
Link to comment
Share on other sites

Thanks again for everyone's thoughts and suggestions. I have made an inquiry to Erhard and will hopefully hear back from him soon. I did place an order for the adapter, 1 cable, and 1 sensor. Maybe, I will have it all by the weekend and by Sunday, have some time to play with it.

 

Someone had asked about my level of expertise in coding. Short answer; not that great when I worked at it regularly as a teenager in the 80's, and very rusty now. I am hoping that my son and I can learn together. Honestly if we can get this to function, even on a limited level in BASIC, that will be fine, and then we can move on to more sophisticated solutions. I would like to take a crack at Assembly Code, or something else more powerful.

 

When I was working at it as a teenager, I always felt I was close to understanding a lot of the theory, and structure of coding, but couldn't quite make the leap to understand and execute it fully. If I could have done this, I would probably have got a degree in computer science, not Geology :)

Link to comment
Share on other sites

  • 4 weeks later...

Ok, quick update, I acquired an 850 interface, serial cable gender changer, the 1-wire to serial adapter, cable, and a temperature sensor. Pictures below. Unfortunately the 850 was damaged in shipping, I was able to super glue the broken piece back on, and the 850 works fine.

 

4268ed7a-46f1-4723-97d4-6749bc8fbdaa_zps

 

e44c346f-d923-4bad-959b-6b34f79a7b68_zps

 

a0dcc46a-2456-4775-a0bf-1c378cc0ac32_zps

 

It looks like there are some pin assignment variations between the 1-wire serial interface versus the Atari 850 serial port configuration.

 

Atari 850 Interface:

 

8a7046f6-a09c-4c5d-b9e1-4f07179cf8a0_zps

 

1-wire serial adapter pin configuration:

 

0fe8866d-3788-422d-8367-9631290a9a40_zps

 

Pin configuration differences:

 

Atari 850 Interface 1-wire adapter

 

Pin 1) DTR (Data Terminal Ready) Not used

Pin 2) CRX (Carrier Detect) RXD (data in)

Pin 3) Data Out TXD (data out)

Pin 4) Data In DTR (Data Terminal Ready)

Pin 5) Ground Ground

Pin 6) DSR (Data Set Ready) Not used

Pin 7) RTS (Request To Send) RTS (Request To Send)

Pin 8) CTS (Clear to Send) Not used

 

I will probably just buy a straight thru serial cable, cut off one end, and use this connector to correct the variation in pin layouts.

 

deda5d22-67bb-4323-9af7-e0b0f2cff9bd_zps

 

I had a really nice email conversation with Erhard Putz about how he used the 1-wire network. He was very ambitious and built his own interface and ran it thru the joystick port. I am not that brave, and I hope that I can use some of the "off of the shelf" components and with a little improvisation, write some code and get a response back from the network. I will update when I get a chance to hook it all up and send some commands to the interface.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...