![]() |
![]() |
![]() |
|
|
|||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
|
|
Thread Tools | Display Modes |
|
|
(permalink) |
|
I'm kind of following up on my "hacking a TFT" display. With respect to that, I've since noticed that there are some good (albeit soporific) webinars on the Microchip website describing how to interface various LCD displays (including QVGA TFTs) to PIC mcus.
Anyways, I've digressed a bit and I'm interested in the intermediate step of creating an NTSC signal from a PIC to display graphics and text on a CRT TV. I've found this guy on Youtube, who seems to know what he's doing. He seems like a nice guy, as long as you can get past the Natural-Born-Killer vibe: YouTube - PIC Microcontroller generating PAL TV signal So what I'm wondering is this: from what I've learned, all the PIC to TV projects are using PAL signals on PAL TVs, which have exactly 64us horizontal scan lines. NTSC doesn't - the horizontal scan is slightly less than that, in order to provide for added coding (for colour, I think) on top of what was the original protocol. The difference in vert sync frequencies, or the different number of horizontal scan lines, between PAL and NTSC don't seem to me to be as big an issue as the fact that each NTSC horizontal scan line is 63.[something] us long. How can accommodate the point-something microseconds if I'm using a PIC mcu?. Or do I need to? I'm not sure how big a deal this is. What I've managed to do so far is get a signal into my TV that looks like scrambled video, but all I've had to experiment with is a 16F88 running from its internal oscillator. I think I'll try ordering some 20MHz oscillators, and perhaps some faster ones to push the tolerance of the mcu a bit, and see what I can make happen with some finer time resolutions. I've only managed a time resolution as small as 10us up to now - I know that's not quite good enough to get something happening. Anyway, any advice on NTSC signal creation would be greatly appreciated! |
|
|
|
|
|
|
(permalink) |
|
A crystal oscillator is going to be needed for a TV signal, stability if nothing else. This is one of the departments AVRs excel at because their I/O is 4 times faster than a PIC at the same clock frequency. There are many college projects done interfacing an AVR to a TV, will give you something to google for information.
AVR based TV cronograph Small AVR-based TV terminal | ยต[micro]electronics info Considering the pulse widths needed a normal PIC probably isn't gonna cut it for a video signal. Even AVRs can at best do a few 100 pixels.
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a straight answer, har har." Last edited by Sceadwian; 5th June 2008 at 02:00 AM. |
|
|
|
|
|
|
(permalink) |
|
Did you check that guy's video? He's got something going on with the PICs, so he must be some kind of wizard. He mentions Sparkfun in either that or one of his other videos, so maybe I'll go take a look to see what I can dig up there. This whole 64us PAL vs. <64us NTSC thing is really bugging me. I didn't anticipate that it'd be something like that holding me up.
I wonder what the Atari 2600 used...? Last edited by Hank Fletcher; 5th June 2008 at 01:57 AM. |
|
|
|
|
|
|
(permalink) |
|
One of the chapters in Learning to fly the 16bit PICs (24F) includes a 24F series NTSC generator. Don Lancasters old Video Cookbook showed off a circuit that used the old 6502 to generate video.
Amazon.ca: Programming 16-Bit PIC Microcontrollers in C: Learning to Fly the PIC 24: Lucio Di Jasio: Books PS don't use 20MHz find something that divides exactly into the VSYNC interval (59.9Hz if I recall) and HSYNC 15.734kHz Last edited by blueroomelectronics; 5th June 2008 at 02:54 AM. |
|
|
|
|
|
|
(permalink) | |
|
Quote:
__________________
========================= Futz's Microcontrollers & Robotics ========================= |
||
|
|
|
|
|
(permalink) |
|
Hank,
What kind of dot pulse resolution do you need on a typical scan line? Mike Last edited by Mike, K8LH; 5th June 2008 at 04:35 PM. |
|
|
|
|
|
|
(permalink) | ||
|
Quote:
Incidentally, in the wiki on PIC mcus, there's a reference in the interupt description for using a PICs interupt capabilities to produce a video signal: Quote:
Last edited by Hank Fletcher; 6th June 2008 at 03:32 AM. |
|||
|
|
|
|
|
(permalink) |
|
have you seen this
Rickard's electronic projects page - PIC-Pong |
|
|
|
|
|
|
(permalink) | |
|
Quote:
By the way, if I'm buying a 20MHz crystal (or is a ceramic resonator better), where should I get if from? Is there much that can go wrong in selecting one, e.g. making sure it's a convenient package size? Last edited by Hank Fletcher; 6th June 2008 at 08:58 PM. |
||
|
|
|
|
|
(permalink) |
|
Try using a 14.318MHz crystal, it's easy to divide down to NTSC frequencies. It's also very common as it was used in IBM PCs from the last century.
Last edited by blueroomelectronics; 6th June 2008 at 09:15 PM. |
|
|
|
|
|
|
(permalink) |
|
Hi Bill,
Any idea how that particular crystal frequency makes it easier to produce an NTSC/RS-170A video signal? |
|
|
|
|
|
|
(permalink) |
|
It's the frequency used on the old CGA cards, 14.318MHz (4 times the NTSC subcarrier frequency).
http://z80cpu.eu/mirrors/www.seasip....agePC/cga.html Or this Programming the MC6845 - The Vintage Computer Forums Last edited by blueroomelectronics; 6th June 2008 at 09:36 PM. |
|
|
|
|
|
|
(permalink) |
|
I think you'll find you need to resort to assembly to attain the neccessary timing accuracy [and possibly speed]
|
|
|
|
|
|
|
(permalink) |
|
No, I meant how would that particular crystal frequency make it easier to produce an NTSC video signal using a PIC?
What is an "NTSC subcarrier frequency"? Mike Last edited by Mike, K8LH; 6th June 2008 at 09:39 PM. |
|
|
|
|
|
|
(permalink) | |
|
It's a multiple (4x) of the NTSC colorburst frequency, although if you want just B&W you'll need to find a crystal that divides evenly into 15,734Hz if your frequency is off you'll get horizontal tearing in the picture.
NTSC - Wikipedia, the free encyclopedia Quote:
Last edited by blueroomelectronics; 6th June 2008 at 09:52 PM. |
||
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Latest |
| Ntsc | TKS | Micro Controllers | 5 | 1st June 2006 08:44 PM |
| Convert an NTSC in-car TV | mcncy | Electronic Projects Design/Ideas/Reviews | 4 | 21st March 2004 09:47 AM |
| NTSC-PAL conversion | apakhira | Electronic Projects Design/Ideas/Reviews | 0 | 25th February 2004 05:04 PM |
| NTSC to PAL CONVERTER | thesim | Electronic Projects Design/Ideas/Reviews | 9 | 13th February 2004 03:32 PM |
| NTSC to PAL convertor circuit (NTSC=>RGB; RGB=>PAL) | apakhira | Electronic Projects Design/Ideas/Reviews | 2 | 30th January 2004 05:05 AM |