Author Topic: PIC Controller Board for Colour TV Pattern Generator – What size PIC do I need?  (Read 1375 times)

0 Members and 1 Guest are viewing this topic.

Offline Chris56000Topic starter

  • Frequent Contributor
  • **
  • Posts: 913
  • Country: gb
Hi!

I want to design a PIC microcontroller PCB to control the Pattern Selection Relays of a Colour TV Pattern Generator I am starting to put together.

I want to use a Turn and Push Rotary Encoder to select the patterns which are displayed by name on a 16 × 2 LCD, and also by the illumination of LEDs, that also operate in tandem with the Pattern Select Relays.

There will be sixteen different pattern names displayed on the LCD, and sixteen Pattern Selected LEDs, with up to six toggled on or off together to select different pattern combinations.

A further three sound control options (440 Hz, 1 kHz and EXTERNAL), each with its own indicator LED, operated by turning the encoder in the reverse direction to select the video patterns, is intended also!

The PIC is NOT used to generate the patterns or the sync pulses, the sync pulses are from a B.A.T.C. ZNA 134 Sync Processor PCB I acquired and the video patterns themselves are generated by TTL and Transistorised circuitry.

Can anyone advise me what PIC16 available in the Hobbyist Flowcode V10 package will accommodate my requirements please?

I'm new to both PIC Microcontrollers and Flowcode with no previous experience in this field!

Chris Williams
« Last Edit: May 22, 2023, 06:33:28 am by Chris56000 »
It's an enigma that's what it is!! This thing's not fixed because it doesn't want to be fixed!!
 

Offline jpanhalt

  • Super Contributor
  • ***
  • Posts: 4005
  • Country: us
If the PIC is only reading a 1 of 16 encoder (4 bits), running a 16X2 character LCD, and selecting one of 16 options, it won't take much.  Do you need interrupts?  If not, a 12F5xx will work.  If you need interrupts, go to the 12F6xx.  Actually a 10F322 may work.  Despite minimal requirements, I would probably start at a 16F1xxx or later 8-bit chip.  Anything more capable would also work. 

With which PIC chips are you familiar?  Have you written any code yet?  If so, that is probably the place to start your decision making for choice of MCU.
 

Offline Chris56000Topic starter

  • Frequent Contributor
  • **
  • Posts: 913
  • Country: gb
I must confess I've not written anything yet, but I am familiar with the 16F877 – the design I originally proposed has now expanded to twenty pattern control outputs, so I am thinking of driving the relays either by row/column matrixing them or by expanding the port with 74138s!

The LCD code seems to be the first thing to tackle, followed by the rotary encoder code, and finally the relay output code!

Unfortunately I'm stuck down at my sister's with gout and don't have my laptop with me to begin writing yet I'm afraid!

Chris Williams
It's an enigma that's what it is!! This thing's not fixed because it doesn't want to be fixed!!
 

Offline jpanhalt

  • Super Contributor
  • ***
  • Posts: 4005
  • Country: us
Do you plan to use a single ZNA134 ( https://www.mikrocontroller.net/wikifiles/b/be/ZNA134.pdf  )?

If so, I don't see why you need a port expander, but that is certainly an option.  I have never used Flowcode, but I was not impressed by the few examples I saw a few years ago.   If something is complicated, I create a typical flowchart and/or spreadsheet to facilitate coding.

EDIT: If you want easy access to a lot of user RAM, consider on of the enhanced PIC's like the 16F1xxx or later.  In those chips, the entire user RAM can be mapped to a single linear block.
« Last Edit: May 24, 2023, 10:23:25 am by jpanhalt »
 

Offline Chris56000Topic starter

  • Frequent Contributor
  • **
  • Posts: 913
  • Country: gb
The reason I was thinking about port expansion was because the contacts of the pattern select relays are all over the place in the analogue sections of the design with no common connections, hence it will need a unique relay for each pattern selected, hence twenty relays!

Can a PIC operate a relay on the matrix principle, by arranging the relays in rows & columns with 4 lines from one port and five from another port, or will that cause really awkward pin definition problems with the code?

Chris Williams
It's an enigma that's what it is!! This thing's not fixed because it doesn't want to be fixed!!
 

Offline jpanhalt

  • Super Contributor
  • ***
  • Posts: 4005
  • Country: us
Why not use a mosfet instead of a relay?  Yes, a PIC can support either directly so long as the relay requires less than 25 mA.  That is the maximum sourced per pin and is clearly state in the datasheet.

How about posting the schematic for just 2 sections (not the entire array of 20 relays)?
 

Offline Chris56000Topic starter

  • Frequent Contributor
  • **
  • Posts: 913
  • Country: gb
I can do that when I finally get back home from my sister's – I've only got a phone here and trying to write code on one is so frustrating I don't want to try again!

I'll draw a simplified diagram when I get back home!

Chris Williams
It's an enigma that's what it is!! This thing's not fixed because it doesn't want to be fixed!!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf