6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Jun 28, 2024 3:50 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri May 03, 2019 5:09 pm 
Offline

Joined: Mon Jun 24, 2013 8:18 am
Posts: 83
Location: Italy
A simple ISR for uart 16c550 + 65c816 is here:

http://65xx.unet.bz/c16sw/

Uart work in fifo mode, can handle these baud rates: 38,400 - 57,600 - 115,200 - 230,400 (uart clocked at 3.6864Mhz), and allow both hardware handshake (through standard null-modem or uplink cable) and software handshake (through xon/xoff control character).

Simple user callable routines for open serial port, put a byte in output buffer, fetch a byte from input buffer, are given.
I maked test with long pattern sequences and all work fine at any of four selectable baud rate, with both of null-modem cable type, and both handshake.

At 230,400 bps i used a trigger level = 14 for rx fifo interrupt, and work fine, but maybe in a busy system need to use the trigger level = 8.

Marco

_________________
http://65xx.unet.bz/ - Hardware & Software 65XX family


Top
 Profile  
Reply with quote  
PostPosted: Fri May 03, 2019 7:41 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8460
Location: Southern California
granati wrote:
A simple ISR for uart 16c550 + 65c816 is here:

http://65xx.unet.bz/c16sw/

and click on "16C550 I.S.R." at the left edge. (The URL does not take you directly to it.)

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 15, 2022 8:56 pm 
Offline

Joined: Thu Jan 21, 2016 7:33 pm
Posts: 270
Location: Placerville, CA
I guess this seems like as appropriate a thread as any, but I'm confused by the terminology most of the 16C550 literature uses regarding the FIFO status bits. Every place I read talks about these bits in terms of the FIFOs being "full," but they seem to mean "not empty" most of the time. Based on example code here and elsewhere, I think that the behavior is as follows:

Status register bit 0 is set whenever there's unread characters in the receive buffer.
Status register bit 5 is set whenever there's room in the transmit buffer.
Status register bit 6 is set whenever the transmit buffer and shift register are completely empty.

This would seem like the logical way for these to work, but can someone confirm this for me? The references I've read are very ambiguously-phrased.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: