![]() |
Forum Index : Microcontroller and PC projects : ASCII Video Terminal
Page 1 of 3 ![]() ![]() |
|||||
Author | Message | ||||
palcal![]() Guru ![]() Joined: 12/10/2011 Location: AustraliaPosts: 1965 |
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: AustraliaPosts: 6220 |
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 KingdomPosts: 2927 |
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: AustraliaPosts: 1965 |
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 KingdomPosts: 2927 |
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 ZealandPosts: 2400 |
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: AustraliaPosts: 935 |
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: AustraliaPosts: 1965 |
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. "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: AustraliaPosts: 1965 |
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 KingdomPosts: 2927 |
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. . . . WW |
||||
BobD![]() Guru ![]() Joined: 07/12/2011 Location: AustraliaPosts: 935 |
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: AustraliaPosts: 1965 |
@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. "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: AustraliaPosts: 1965 |
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: AustraliaPosts: 935 |
Paul this is a quote from GeoffG's web site. 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: AustraliaPosts: 1965 |
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 KingdomPosts: 2927 |
@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: AustraliaPosts: 1965 |
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: AustraliaPosts: 1965 |
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: AustraliaPosts: 935 |
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. |
||||
cosmic frog Senior Member ![]() Joined: 09/02/2012 Location: United KingdomPosts: 300 |
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 ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |