Robotics Project: Interfacing LCD Screen to FPGA

Click For Summary

Discussion Overview

The discussion revolves around the challenge of interfacing an LCD screen to an FPGA for a robotics project. Participants explore methods to reduce the FPGA's clock signal from 50MHz to the optimal frequency range of 7.83-9.26MHz for the LCD, specifically targeting 9MHz with a 50% duty cycle.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant mentions the need to slow down the 50MHz clock signal to meet the LCD's frequency requirements.
  • Another suggests using a multiple-stage counter to divide the frequency, proposing a division by 6 to achieve approximately 8.3MHz.
  • A participant points out that some FPGA families may not function well at 50MHz and suggests sourcing an 8MHz crystal oscillator as an alternative solution.
  • Concerns are raised about achieving a 50% duty cycle when dividing by 6, with a suggestion to first divide by 3 and then by 2 to maintain the duty cycle.
  • A later reply introduces the idea of using a shift register (specifically a 74F164) to achieve a perfect 50% duty cycle while dividing the frequency, detailing a method to implement this approach.

Areas of Agreement / Disagreement

Participants express differing opinions on the best method to achieve the desired frequency and duty cycle, with no consensus reached on a single solution. Several approaches are proposed, but the discussion remains unresolved regarding the most effective method.

Contextual Notes

Participants note potential limitations related to the specific FPGA family being used and the characteristics of the components suggested for frequency division. The discussion reflects uncertainty about the performance of various methods in achieving the required specifications.

Feldoh
Messages
1,336
Reaction score
3
Hello,

I'm working on a robotics project with one of my friends for an (relatively small) competition at my school. Anyways part of our project involves interfacing an LCD screen to an FPGA however we're having a problem with that particular aspect of the design.

The clock signal on our FPGA is 50MHz and the optimal frequency of the LCD is 9MHz. Needless to say I'm rather confused on how to slow down the signal enough to meet spec for the LCD.

Spec is 7.83-9.26MHz with 9.00MHz ideal with a duty cycle of 50% +/- 5%

We can't seem to get a divider that will work, any suggestions?
 
Engineering news on Phys.org
A multiple-stage counter should be able to divide by 6 to give you 8.3 MHz. I'm not sure which parts run at 50MHz these days though...
 
Thanks for the reply, I'll look into a multi-stage counter.

The board we're using is in the Altera Cyclone III family with an onboard crystal quartz oscillator at 50MHz.
 
Dividing from 50 MHz is not trivial and some families of chips do not work at this frequency.

You could just look for an 8 MHz crystal oscillator.

You can probably find a source near where you live, but here is one in West Australia:
http://members.iinet.net.au/~worcom/
Use the online catalog. Price is AU$4.40 plus post.

These usually just require +5 volts and ground, and you take the output from one of the 4 pins.
 
If you just program a chip to divide by 6, you most likely will not get a 50% duty cycle. You may need to divide by 3 followed by a separate divide by 2 circuit.

Bob S
 
Bob S said:
If you just program a chip to divide by 6, you most likely will not get a 50% duty cycle. You may need to divide by 3 followed by a separate divide by 2 circuit.

Bob S

Agreed.

One really useful trick to get a perfect 50 % duty cycle is to use a shift register. A 74F164 serial in, parallel out shift register is ideal and there are 74HC164 and other types available, depending on the input frequency required.

You feed in the 50 MHz, in this case, to the clock input then invert one of the outputs (with a 74F04 or similar high speed inverter) to feed this to the data input line.

Initially all outputs will be zeros, so these are fed back as ones by the inverter. However it takes 3 clock pulses for the 3rd output to go high, so the 4th clock pulse puts a zero from the data input line into the shift register first stage.

The process continues with each 3 input pulses producing high outputs and the next 3 producing low outputs.
So, you divide by 6 with a perfect 50% duty cycle.
The outputs of the shift register can be used to produce divisions of 2, 4, 6, 8, 10, 12, 14 and 16, just by moving the input connection of the inverter. Very useful for some oddball divisions.
Here is my circuit, which I developed years ago, but have not published (until now):
[PLAIN]http://dl.dropbox.com/u/4222062/Shift%20register%20idvider.PNG

It uses a NAND gate as an inverter. Artwork by John, VK6JY.
 
Last edited by a moderator:
Bob S said:
If you just program a chip to divide by 6, you most likely will not get a 50% duty cycle. You may need to divide by 3 followed by a separate divide by 2 circuit.

Bob S

That's the problem I'm having is that with a regular counter the duty cycle is too skewed.

Agreed.

One really useful trick to get a perfect 50 % duty cycle is to use a shift register. A 74F164 serial in, parallel out shift register is ideal and there are 74HC164 and other types available, depending on the input frequency required.

You feed in the 50 MHz, in this case, to the clock input then invert one of the outputs (with a 74F04 or similar high speed inverter) to feed this to the data input line.

Initially all outputs will be zeros, so these are fed back as ones by the inverter. However it takes 3 clock pulses for the 3rd output to go high, so the 4th clock pulse puts a zero from the data input line into the shift register first stage.

The process continues with each 3 input pulses producing high outputs and the next 3 producing low outputs.
So, you divide by 6 with a perfect 50% duty cycle.
The outputs of the shift register can be used to produce divisions of 2, 4, 6, 8, 10, 12, 14 and 16, just by moving the input connection of the inverter. Very useful for some oddball divisions.
Here is my circuit, which I developed years ago, but have not published (until now):

Thanks for the incite!
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
8K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
8K
  • · Replies 24 ·
Replies
24
Views
5K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 25 ·
Replies
25
Views
8K
  • · Replies 11 ·
Replies
11
Views
6K
  • · Replies 8 ·
Replies
8
Views
5K