SPI Interface

...but probably not in any PC made since 2000. The only serial ports in them tend to be on additional PCI cards in case you hadn't noticed.

My main PC has no serial ports on its motherboard. Since I still have a few flight loggers and a GPS receiver or two that only have serial connections, I had to install a 6 serial port PCI card to it. This, course, has 16550s on it. However, in *this century* I've never needed to program a UART of any sort at the device register level or to know anything about it because all the systems I've needed to use serial comms on: various UNIces,Stratus,Linux and OS/9 already have excellent serial device drivers. So, why would I ever need to reinvent *that* wheel?

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
org       |
Reply to
Martin Gregorie
Loading thread data ...

Because you need performance better than the GP OS you have can deliver

so bare metal programming rears its gorgeous head...

"Your job is to take this board, with a UART a floppy disk controller,

256K of ROM, and 1M of RAM and make all the hardware work, write a BIOS, and a simple operating system, put a c library on it and port this FORTH interpreter"

Did it in 6 months.

Thank god all they wanted was a wyse terminal as GUI

--
Everything you read in newspapers is absolutely true, except for the  
rare story of which you happen to have first-hand knowledge. ? Erwin Knoll
Reply to
The Natural Philosopher

Sounds like you might have done better to unroll the loop a few times...

--
-michael - NadaNet 3.1 and AppleCrate II: http://home.comcast.net/~mjmahon
Reply to
Michael J. Mahon

Good example given below, but speaking entirely for myself, I've never knowingly driven an RS232 terminal faster than 19.2 Kbaud, though I've used faster serial comms links, though not hugely so: IIRC an X.25 DCE typically ran at 38.4 Kbaud over RS232 or RS422 links by the mid '90s - and I got involved in quite a lot of X.25 stuff, mainly because it used to be popular for networks of ATMs.

I really liked Wyse kit and had a Wyse 120 hung off my OS/9 box for years. Their white displays were among the sharpest I've used.

At least the Forth port should have been fast, if only for the tiny amount of assembler in it. I diddled around with it a bit on the 6809, but never really got on with it as a language or a programming environment. I've never understood why the astronomers found it so addictive. However, I must admit its one of the world's best write-only languages (IMO APL is the best!).

Has anybody ported Forth to the RPI?

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
org       |
Reply to
Martin Gregorie

Which Forth? There are dozens.. and no need to "port" when they're standard Debian packages.

e.g.

gordon@cmpi0:$ sudo apt-get install gforth ...

gordon@cmpi0:$ gforth Gforth 0.7.0, Copyright (C) 1995-2008 Free Software Foundation, Inc. Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license' Type `bye' to exit : hateForth ." Can't stand the thing" ; ok hateForth Can't stand the thing ok

Gordon

Reply to
Gordon Henderson

Probably yes. Did not think of that back then.

The Z-80 had useful instructions like "input a value from a port, store it at a memory location pointed by a register, increment the pointer, decrement a counter, and do it again until the counter is zero". However, these could often not be used because e.g. a bit-test was required before each transfer. I don't remember if I used these with the harddisk driver, but the floppy did not.

Reply to
Rob

This is not true at all! There are serial ports (and sometimes parallel) on many PC's made 5-10 years later than that, and they are implemented using special chips that have one or two 16550-equivalent UARTS and a parallel port (with DMA) on a single chip. Those are also used on the PCI cards.

Reply to
Rob

The problem was not the multitasking OS, but the use of "disable interrupt" in many drivers and other software as a means of getting a lock on memory data.

Also there were disk controllers that in that era of programmed-IO were built with the incorrect assumption that the CPU would transfer the whole block of data for a sector in a single programmed-IO action.

When an interrupt occurred during the transfer, and thus the transfer paused for a couple of microseconds, the transfer would fail. So disk device driver programmers had to disable interrupts during the transfer, which was a pain for devices that issued many interrupts per second that had to be timely handled.

Therefore the UARTS got a FIFO so there would be no immediate overrun when the CPU did not handle the receive interrupt immediately.

All those preconditions no longer exist today.

Reply to
Rob

There's a serial port (on 5x2 header) on the new motherboard I bought last month.

Reply to
Andy Burns

Yes, there is one on mine as well. But it is not the cheapest model and it could be that those no longer have it. Parallel ports seem to be gone. Most boards no longer have a floppy controller or parallel ATA either.

Reply to
Rob

I was pleasantly surprised at the price, plenty of "enthusiast" boards

3x to 4x the price and no better for my needs, the cheapiest similar ones are just over 1/2 my price.

That was gone on my previous board

They're gone too, shame I only have one optical drive active now, and the combined floppy+sd+mmc+cf+whatever card reader isn't hooked up.

Reply to
Andy Burns

it as a HUGE amount of assembler.

Because there was a forth library as well.

I didn't write it though, by some extraordinary means the project manager had got it from somewhere PRINTED IT OUT onto around 4" thick stack of A4 paper. That had been photocopied, and that was all I had

My job partly consisted of retyping it and getting it to work, and adapting the hardware specific bits of IO..

--
Everything you read in newspapers is absolutely true, except for the  
rare story of which you happen to have first-hand knowledge. ? Erwin Knoll
Reply to
The Natural Philosopher

You just get better. You really have no clue at all. Most PC chipsets include 16550 clones, they just don't get connected up. The 2013.06 HP i7 in front me actually does have one wired.

And I had noticed, I work for a semi design house and know how many millions of our 16550 UART designs get sold.

Reply to
mm0fmf

Absolutely - the E35M1-M-Pro I bought in 2010 has COM1 and LPT.

Reply to
Rob Morley

In the embedded world you can still get both.

At work we put together a system that uses 4 serial ports all on the MOBO. Our customer *specifically* required them, due to their simplicity and reliability.

--
W J G
Reply to
Folderol

LDIR if the hardware was memory mapped

Reply to
Baho Uttot

Interesting! This wasn't the case for the 6809 Forth port I installed under my copy of Flex09. The assembler preamble that sets up the environment was simply a jump to one of the bottom level words. The 100 or so lowest level words in the dictionary were said to be the only words that weren't written in Forth.

From a quick scan of the Wikipedia article on Forth, it seems that this was probably a derivative of FORTH, Inc.'s microFORTH implementation.

There was no assembly language Forth library. There was a Forth library but it was written in Forth and took the form of a Flex file that held the support code as a set of 1K (16 lines of 64 characters) pages (screens?).

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
org       |
Reply to
Martin Gregorie

So what, oh pseudonominous fount of all PC wisdom, is the point of having inaccessable UART functionality?

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
org       |
Reply to
Martin Gregorie

No, this instruction is called INIR.

LDIR is for memory block copies and it cannot be used for the typical disk controller which won't present it sector buffer mapped in memory. (not even with memory-mapped I/O, as the floppy controller in a TRS-80)

Reply to
Rob

The chips you use as building blocks for the PC have more than one function combined in a single chip, and so the designer just leaves some things unconnected that are not required for that specified model. This then saves the cost of an RS232 driver and associated caps, a connector, and the space to place that connector.

Reply to
Rob

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.