Deja News Toolbar Search over 20,000 high-tech jobs Click here for over 20,000 high-tech jobs message/thread Message 39 of 347 for search * return to search results help RE: Modem Routines Author: John Iannetta <73510.2152@CompuServe.COM> Date: 1999/02/17 Forum: comp.sys.cbm sponsored by: eBay more headers author posting history post reply prev next _________________________________________________________________ Patrick/RPG said, "Trying to refresh myself with some modem I/O. I can get the command channel open, I can print to it, read it, check for carrier, etc. However, I can't remember how to hang the modem up. I know that there is a set of poke/peek's available that will kill the modem, and this eliminates the need for +++/ATH combinations. .. .. ..". You don't say whether you are using the user port, or the cartridge (expansion) port. But since you mentioned opening the command channel, I'll assume that you are using the user. Your 28.8 kbps modem won't do more than 1200 bps, using the C-64's RS-232 routines (the software ACIA). And at 1200, you can't use the baud rate table. So at 300, you can do: open2,2,2,chr$(6)+chr$(0) for 8N1 (8-bit word, No parity, 1 stop bit). But at 1200, you must do: open2,2,2,chr$(0)+chr$(0)+chr$(59)+chr$(1) in NTSC countries, and open2,2,2,chr$(0)+chr$(0)+chr$(44)+chr$(1) in PAL land. Those statements set the bit rate to 1228 bps. The ML routines were never meant to be used at high bit rates; they suffer at speeds higher than about 600 bps. Since the detector in a modem increases the intra-byte bit rate of received data, using the odd-ball bit rate compensates for that. At 2400, modified RS-232 routines are needed. Using a hardware ACIA (like SwiftLink or Turbo232) which connects to the cartridge port, much higher speeds are possible. SwiftLink gives 16 speeds from 100 to 230400. Turbo232 gives 2 extra speeds, and 57600 and 115200. Programs written for the user port are not usable with the cartridge port. To hang up the modem without using the Hayes command set, you should clear bit 2 of $DD01: poke57577,peek(56577and251) But remember that your RS-232 interface adapter may not support the DTR line (which that poke controls). Also, your modem's AT&D command controls whether taking that line low puts the modem on-hook. The pokes in your article do NOT apply to Hayes-compatible modems; they toggle bit 5 of $DD01, which early C-64 modems used for on-hook/off-hook (and also to do pulse dialing). It's intersting that one model of CBM modem was on-hook with that line high, and another with that line low. Regarding DCD (Data Carrier Detect), whether that line is high or low with a carrier present, depends on your interface adapter. I THINK that the Omnitronix model has a switch to control polarity. Finally, here's a tip to make the first byte from the modem read correctly. Do a: poke169,1 before running your program. -- I pressed RETURN, and the message said, "Missing GOSUB". John _________________________________________________________________ view for bookmarking text only mail this message to a friend post reply << prev · next >> subscribe to comp.sys.cbm SPONSORED LINKS Yellow Pages · Bid on Bargains · Express by Infoseek · Shopping · Free Stuff AutoConnect · Trade with Datek · Auctions & Classifieds · GET IT NOW @ NECX Home · Communities · My Deja News · Power Search · Post About Deja News · Ad Info · Our Advertisers ____________________________________________________ Copyright © 1995-99 Deja News, Inc. All rights reserved. Conditions of use · Site privacy statement reviewed by TRUSTe