Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 16:23 11 May 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : ASCII Video Terminal

     Page 1 of 3    
Author Message
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1965
Posted: 08:31pm 15 Jul 2014
Copy link to clipboard 
Print this post

Just built a short form version of the VT100 terminal to use as a Composite Video Interface. I have hooked it up to a micromite, what command do I use to send information to the screen.
eg. how would I send "Hello World"
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6220
Posted: 10:11pm 15 Jul 2014
Copy link to clipboard 
Print this post

You will need to look at the VT100 command list.
A list of the ones that the terminal knows about was published in Geoff's article in Silicon Chip.

Here are a few to get started with:
http://www.thebackshed.com/forum/forum_posts.asp?TID=6695&PN =3

Simply PRINTing without any VT100 commands will also work until you want to position the text.

If you EDIT your program, the VT100 commands are used automatically so that is a good way to test the terminal.

Jim


VK7JH
MMedit
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2927
Posted: 10:27pm 15 Jul 2014
Copy link to clipboard 
Print this post

In addition to the above link, check out the links at the bottom of Geoff's page here. They contain additional commands for drawing basic shapes too.

In its simplest form, treat the ASCII Terminal as a TeraTerm window. So using the PRINT command will do the same as it would in TeraTerm. Therefore: PRINT "Hello World" will do what you ask; however, like Jim says above, to position the text you need to incorporate the appropriate escape code(s) with the relevant parameters.

Hope these two posts help you to get started . . .

WW
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1965
Posted: 10:31pm 15 Jul 2014
Copy link to clipboard 
Print this post

Thanks, tried using PRINT and I have the SC article and tried some escape codes, but it didn't work. I am using the 'video in' on a small TV, I expect that should be Ok.
I will have to check everything again.
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2927
Posted: 11:36pm 15 Jul 2014
Copy link to clipboard 
Print this post

Hi Paul,

See here to possibly correct things! A few people were having 'issues' when using the composite output which Geoff has just addressed with a new release of firmware.

Also, is this built on an 'official' PCB, or your own board? Do you have the ability to connect a VGA monitor instead?

WW

 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2400
Posted: 02:44am 16 Jul 2014
Copy link to clipboard 
Print this post

as long as some writing is appearing on your terminal screen, you are on the right track. the following demo uses escape sequences to clear screen, position cursor, and change colours. it assumes an 80x25 display, but should do something semi-sensible if narrower.

i do recall a while back that some folks were corrupting escape sequences by inadvertently putting in extra whitespace.

rob :-)

clrscr
Print at$(21,3) colour$(4) "Colour MicroMite Demonstration"

For B=30 To 37
For C=40 To 47
Print at$((B-25)*4, C-35) colour$(1, B, C) "abcd"
Next C: Next B

For A=0 To 9
Print at$(17+(A*4),14) colour$(0, 37, 40) Str$(A)
Print at$(16+(A*4),16) colour$(A, 37, 40) "xxx"
Next A

Print at$(1, 20) colour$() "press enter to exit ";
Line Input a$
End


Function at$(x,y)
at$=Chr$(27)+"["+Str$(Y)+";"+Str$(X)+"H"
End Function

Function colour$(A, B, C)
Local temp$
temp$=Chr$(27)+"["+Str$(A)
If B<>0 Then temp$=temp$+";"+Str$(B)
If C<>0 Then temp$=temp$+";"+Str$(C)
colour$=temp$+"m"
End Function

Sub clrscr
Print Chr$(27)+"[2J"
End Sub
 
BobD

Guru

Joined: 07/12/2011
Location: Australia
Posts: 935
Posted: 06:30am 16 Jul 2014
Copy link to clipboard 
Print this post

Paul
You need to look at this thread where it was established that there was a need to end your VT100 Escape codes with a semi colon. Also to correctly use upper or lower case as required for the particular command.
Bob
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1965
Posted: 11:47am 16 Jul 2014
Copy link to clipboard 
Print this post

My problem is I get nothing at all, I have checked everything over a couple of times,
today I will remove the 250 and program it with MM basic to test it, it was one I had left over from the GPS tracker.
Paul.

@WhiteWizard,
I only have it built on a breadboard and it is only a short form version with no VGA.Edited by palcal 2014-07-17
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1965
Posted: 02:32pm 16 Jul 2014
Copy link to clipboard 
Print this post

Seems I'm getting somewhere (but not far). I was using V1.2, I reverted to Ver1.0 and now at least get something on the screen but only with TerraTerm running. When I press any key on the keyboard I get a blurry cursor appear, continual presses make this cursor (ie. if it is a cursor) jump to the right about three spaces then left two spaces but it only occurs on line 1.
I tried using the ESC code for CLS and typed it in wrong I typed "print chr$(27) [J" and it cleared the screen but when I type the correct escape code it does nothing except clear the TerraTerm screen.
I take it I don't have to alter anything in the Set UP Menu, as I'm only using the circuit for the Composite Video Interface as in SC mag. I don't have a keyboard attached.
I thought I would be able to build this short form circuit and just use it as a video display for a project.
Paul.

"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2927
Posted: 04:28pm 16 Jul 2014
Copy link to clipboard 
Print this post

Paul,

Is your display a composite PAL or NTSC? The terminal firmware defaults to PAL so you will only need to go into the Set-Up screen if using NTSC.

Is your circuit as that shown in Fig 3 on page 64 July SC magazine? If so, how are you connecting to TeraTerm? Are you using a USB-to-Serial module connected to CON1? OR have you added a USB socket (CON2)?

Is you 10uF cap a low ESR type? If not this will cause issues.

Are you using a 8MHz crystal with caps mounted closely to the PIC? These leads ideally need to be kept as short as possible.

As your circuit is not assembled on an official PCB, triple check connections and pin-numbers. Is breadboard introducing unwanted capacitance?

Is your PIC mounted in a socket? If so, are any pins bent and hence not connected?

Assuming your circuit and display selection is correct, then as soon as you supply power, you should see a 'welcome' message. Are you seeing anything (even garbage)?

Feedback to the above will help diagnose your issue. . . .

WWEdited by WhiteWizzard 2014-07-18
 
BobD

Guru

Joined: 07/12/2011
Location: Australia
Posts: 935
Posted: 04:59pm 16 Jul 2014
Copy link to clipboard 
Print this post

Paul
If you read the article you will see that under certain conditions the PIC will assume it has a VGA connected and not a composite video. Is there any way that this is happening?
Bob
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1965
Posted: 05:09pm 16 Jul 2014
Copy link to clipboard 
Print this post

@WW.
Firstly I found it strange that reverting to V1.0 made a difference.
My display is PAL, I am using the circuit as in Fig3 SC mag., 10uf cap is OK same as I use with Micromite, XTAL and caps are OK close to PIC and short leads and I have checked my wiring over and over.
The Micromite chip is in my Proto Board that has USB to Serial to connect to TerraTerm.
I have jumped a wire from Pin11 on Micromite to Pin5 on Breadboard and also connected power from protoboard to breadboard.
On power up I get what appears to be a distorted cursor top left of screen for about a second then it disappears.
For display I am using an old B&W 5" TV that works OK with a camera connected.
I am waiting for 4.3" display as in SC.
Paul.
Edit.
@BobD I can't find any mention of that in the article.Edited by palcal 2014-07-18
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1965
Posted: 05:43pm 16 Jul 2014
Copy link to clipboard 
Print this post

Just found this post and don't know what the outcome waslink
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
BobD

Guru

Joined: 07/12/2011
Location: Australia
Posts: 935
Posted: 07:47pm 16 Jul 2014
Copy link to clipboard 
Print this post

Paul
this is a quote from GeoffG's web site.
  Quote  The microcontroller automatically determines the type of terminal that is connected on power up. It does this by measuring the resistance from pin 12 to ground. If it is less than 2K it assumes that a VGA monitor is plugged into the VGA connector and the video should be generated at pin 12 with the correct timing for a VGA monitor. Otherwise the firmware assumes that a composite monitor is connected and the video is then generated from pin 6 with timing to suit the PAL standard (NTSC can be selected on the setup screen).


and the outcome of that thread in the previous post was anew firmware release v1.2 I think it was.
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1965
Posted: 08:12pm 16 Jul 2014
Copy link to clipboard 
Print this post

I have nothing connected to Pin 12 so that should not be the problem. As for V 1.2 Geoff mentioned that it had something to do with the PAL signal corrupting the USB.
I would be interested to know if anyone has the composite video working in PAL mode.
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2927
Posted: 09:45pm 16 Jul 2014
Copy link to clipboard 
Print this post

@paul, The fact you are getting 'scrambled' output of some sort on your display implies it is likely to be either a display issue (but you say this works with other hardware), or a timing issue with the video output.

The fact that the circuit is built on a breadboard may be introducing stray capacitance somewhere which is the sort of thing that corrupts video signals. Is it possible for you to build this simple circuit on a small piece of strip-board i.e. soldered. This will eliminate any other breadboard issues. If so, use an IC socket for the PIC.

NOTE: I had one customer who just could not get his MicroMite module working on a breadboard. Grogster and I spent a few hours head-scratching trying to resolve the issue. It turned out to be a cheap faulty breadboard - some of the contact strips were too low in the breadboard housing and hence components weren't physically connected even though they were plugged into the breadboard.

Another thing to bear in mind (although this isn't your issue) is that the circuit shown in Fig 3 means that the three baud rate selection jumpers (PIC pins 11, 7 and 3) are open circuit. This defaults to 1200 which is then also the option to manually change the baud-rate from within the Set-Up screen. You will need to change this to 38,400 (assuming your MicroMite is set at this too). To change the terminal baud rate, either ground pins 11 & 3 (refer to table in Fig1) or go into SetUp screen and select Option G.

By the way, can you see the Set-Up screen (Shift+F12)?

Do you have another PIC250 that you can try?

awaiting your response . . . .

 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1965
Posted: 10:37pm 16 Jul 2014
Copy link to clipboard 
Print this post

WW, I can't see anything except the blurry cursor for a few seconds when using V1.0 I switched back to V1.2 and get nothing at all. My 250 is OK I loaded it with MM Basic and it was fine.
As for the breadboard it is brand new this is the first time I have used it and I have checked all connections with a meter.
The Baud rate seems like a possible answer I will play around with that although there was nothing mentioned in the article about this when using Composite Video.
Paul.

PS.
BREADBOARD brings back memories, for those much younger than I, I built my first Xtal Set about 60 years ago on a piece of wood and you guessed it was called a BREADBOARD.
They have changed a bit but the name stuck.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1965
Posted: 11:00pm 16 Jul 2014
Copy link to clipboard 
Print this post

Shorted Pins 11 and 3 to ground to change Baud rate to 38400. With V1.2 loaded still nothing. But with V1.0 I now get a wide black line down the middle of the screen and nothing else.
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
BobD

Guru

Joined: 07/12/2011
Location: Australia
Posts: 935
Posted: 11:02pm 16 Jul 2014
Copy link to clipboard 
Print this post

Paul
the baud rate setting is irrelevant to the composite video. It is the setting for the link to the MicroMite. If that doesn't match the Micromite setting then you will have garbage displayed. As Phil said, if you don't have baud rate jumpers then you will have to use the config screen. That may be difficult without a keyboard. See the article and set the baud rate jumpers to match the serial output from the Micromite. If I recall correctly then the default for the MM is 38400 so you will need to ground pins 11 and 3 on the Terminal. If you make a change to these pins you will need to do a power cycle.
Bob

edit: I see you have already done my suggestion. Time for my dinner.
Edited by BobD 2014-07-18
 
cosmic frog
Senior Member

Joined: 09/02/2012
Location: United Kingdom
Posts: 300
Posted: 11:27pm 16 Jul 2014
Copy link to clipboard 
Print this post

Hi, you say you "can't see anything but a blurry cursor for a few seconds when using V1.0".
This is the same thing that happened with me. I checked my connections over and over and pre-programmed the chip but still the same, so I connected it up to a VGA monitor and it worked first time. Once connected to VGA I could then change the settings to NTSC which works on the composite output.
Geoff has posted a fix for this in v1.2 but I have not tested it yet.
So I looks like your terminal IS working, it just needs to be connected to VGA.

Dave.
 
     Page 1 of 3    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025