Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Archive » net.micro.cbm » Generating a BREAK on the C64
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Generating a BREAK on the C64 [message #113889] Tue, 17 September 2013 14:53
Originally posted by: @RUTGERS.ARPA:prindle@nadc
Message-ID: <935@topaz.ARPA>
Date: Mon, 11-Mar-85 16:38:56 EST
Article-I.D.: topaz.935
Posted: Mon Mar 11 16:38:56 1985
Date-Received: Tue, 12-Mar-85 22:45:16 EST
Sender: daemon@topaz.ARPA
Organization: Rutgers Univ., New Brunswick, N.J.
Lines: 31

From: prindle@NADC

This is a reply to gitpyr!wutka@topaz.  To generate a break, all that is
necessary is to toggle the appropriate bit (transmitted data) on the CIA
chip that is driving the RS-232 modem.  The code to do this is shown
below (Eric, you'll recognize this!):

	lda $dd00	;turn off bit 2
	and #$fb
	sta $dd00
	ldy #250	;delay
loop2	ldx #250
loop1	dex
	bne loop1
	bne loop2
	lda $dd00	;turn on bit 2
	ora #$04
	sta $dd00

If your timing of the BREAK signal is critical, you can adjust the constants
(currently 250) to get the exact delay you want, although most uarts will
detect BREAK anytime the stop bit is missing, so for the slowest baud rate
conceivable of 50 bps, a 10 bit frame would be 1/5 second, so 1/4 second 
on up should be adequate for any system to detect break.  You don't want it
to be too long, because your RS-232 input buffer could be filling up while
you are hanging around in the delay loop, and at 1200 baud it doesn't take
very long (~2 seconds) to fill.  Hope this makes it clear.

Frank Prindle
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Compilers desired
Goto Forum:

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Jul 12 23:48:01 EDT 2020

Total time taken to generate the page: 0.00351 seconds