SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Mikitty
#100447
Hi everyone,

I'm trying to interface the PSP LCD with a Virtex 4 evaluation board (I'm attempting to make a pseudo navigation system for a digital design class I'm taking), and, well, unfortunately, it's not working (I haven't worked with graphics LCDs before, so I'm a bit lost...).

First, I was wondering if I should be able to detect anything when I don't have the backlight powered (that might be a reason?). I've simulated the Hsync/Vsync signals, and the readings from a logic analyzer seem to be correct (on that note, I just wanted to check, but is Vsync supposed to go low on the falling edge of Hsync or on the rising edge? I might've missed it, but the datasheet wasn't too clear on that). I'm currently just trying to display a blank white screen.

I don't have any means to step up 5V to 20 or whatever V currently, but I could somehow connect the backlight power to a voltage supply... if that is the issue.

Also, why is it necessary to sequence the power supply such that AVDD turns on after VCC? Should not having such a sequence prevent the LCD from turning on? And would a makeshift solution be to just to connect the AVDD manually after the board has been turned on?

And finally, if I'm not sure that my actual LCD is working, is there any way to test that? I got the LCD from some Amazon seller when they were out of stock on Sparkfun.

I have also been trying to implement an SPI controller in the FPGA. I can read the ADXL345 device ID without any issues, and, for the most part, I am at least able to get values when I run self test. However, when I switch to normal operation, I don't seem to ever be getting a data ready interrupt.

I had my registers set as follows (and I'm wondering if anything I'm doing is inappropriate or if I need to set additional registers...):

constant DataFormatSetup : STD_LOGIC_VECTOR (0 to 15) := -X"3120";
-- 0x31 : Data Format Register (set to 0x20)
-- Bit 7 cleared : self-test force disabled
-- Bit 6 cleared : 4-wire SPI mode
-- Bit 5 set : Active low interrupt
-- 0
-- Bit 3 cleared: 10-bit mode
-- Bit 2 cleared: right justified mode with sign extension
-- Bits 1 and 0 cleared: +/- 2g range

constant InterruptEnableSetup : STD_LOGIC_VECTOR (0 to 15) := X"2E80";
-- 0x2E : Interrupt Enable (0x80)
-- Bit 7 set : enables Data Ready interrupt (Note on pin INT1)

constant DataRateSetup : STD_LOGIC_VECTOR (0 to 15) := X"2C0F";
-- 0x2C : Data Rate and Power Mode Control
-- Low Byte set to F: Output Data Rate of 3200 Hz

constant PowerControlSetup : STD_LOGIC_VECTOR (0 to 15) := X"2D08";
-- 0x2D : Power Control
-- Bit 3 set : Measurement Mode

constant DataReadRegisterStart : STD_LOGIC_VECTOR (0 to 15) := X"3200";
-- 0x32 : DataX0 register


Sorry for the trouble! ._.;
By Mikitty
#101062
Hi everyone,

Sorry for double posting. I've managed to get the accelerometer to output values to my FPGA (I guess some of my original register values were incorrect, although I still can't understand why...), and I've been using a logic analyzer to look at output data. I've also managed to get RGB/CYM displaying on the LCD (for anyone else who doesn't have a voltage up converter, at least you can use a power supply w/ ~23 V to test the screen/backlight).

My question now is... how am I supposed to interpret the accelerometer data? For +/- 2G, you have a full resolution of 10 bits. From reading other posts, I get that if you're accelerating at +1G, you should get a reading of approximately 256.

My question is... how does the 0g bias level play into effect? How should I be calibrating the accelerometer?

The datasheet says that the 0g output for X and Y can be minimum - 150, typically +/- 40, and maximum + 150.

At rest, I'm getting

0x3DE = -34
0x3FA = -6
0x00A = 10
0x00C = 12
0x3DA = -38
0x020 = 32
0x024 = 36

(occasionally it gives me something funky... but, I guess I'll ignore that...)

These values are in the biasing range (though I kind of expected this to have already been accounted for by the accelerometer...). I'm just not sure what to do about that with regards to offsets.
By Mikitty
#102111
So I've also been working on a touch screen controller for the PSP touch screen. I made an ADC to interpret voltage from the PSP touch screen with 6 op amps, a couple of resistors, 2 caps, and some simple logic in my FPGA, but I'm having an issue with having the output floating when there isn't anything touching the touch screen. The output is at Vdd/2 when I'm not touching the screen. If I add a very large pull down resistor, I get essentially the same thing. When I add a smaller pull down resistor, the output drops to below Vdd/2 (although it doesn't drop to 0), and the output from my ADC isn't quite linear. One solution is to make 2 samples: Sample with pull up and pull down and if the values are very different, then you know you have a floating condition... but is there an alternative solution?

More importantly,

I'm still horribly stuck dealing with my accelerometer. I've done some double integration and noise reducing (taking averages, etc.)... and well, when I move my accelerometer left and right or in any other direction translationally, none of my X position numbers seem to make sense, but when I tilt the accelerometer left and right, my position numbers increase as I tilt in one direction and decrease as I tilt in the other direction (the numbers correlate with the direction of tilt). Does anyone have an explanation for this? The same happens for Y position...

It feels like more of a gyro than an accelerometer...

Or is the translational motion from tilting just a lot less noiser?
By mikeselectricstuff
#102124
You really do need the backlight to see anything - generating it isn't exactly rocket science...
I wouldn't worry too much about the sequencing.
By busonerd
#102133
Do sequence the power/clk/disp signals.

I found when I was working with the PSP LCD, if you don't sequence the power as indicated in the datasheet, it will lead to incorrect display functionality [grey screen, off-grey screen with random colors] or excessive power consumption.

--David Carne
By Merlon74
#135563
Hello Mikitty, I am having slight difficulty connecting the Voltage to the backlight. The datasheet indicates Pin1[-ve Voltage] and Pin4[+ve Voltage]. Is this indeed a Bi-Polar connection with -23V and +23V, or is it GND and +23V.

Also to confirm the power connection is Pin1 the left most when looking at the copper???

Last and least, do you have a list of recommended components to use to step up a 5V to the required Backlight voltage.

Thanks for reading my post and I look forward to your response. It may seem a little trivial, but I am having troubles getting this LCD to work.

Thanks again,
Merlon74.