Go to advanced search

by Conjur
Mon Aug 22, 2016 2:12 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: KeDei 3.5 inch 480x320 TFT lcd from ali
Replies: 235
Views: 200688

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Final post on the KeDei v5.0 code. Below are images of the reverse of the board to show connections and version; and an image of it loading a bmp from SPIFFS. Here is the exact code (poor formatting and all!) used in these pictures. MOSI -> GPIO13 CLK -> GPIO14 L_CS -> GPIO4 5V -> 5v supply GND -> G...
by Conjur
Thu Aug 18, 2016 7:07 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: KeDei 3.5 inch 480x320 TFT lcd from ali
Replies: 235
Views: 200688

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

I have been out of country for a few weeks, so I cannot get a video of it working; below is the last functional code I have. I believe I had the SPI Mode wrong in the code I posted above, it should be SPI.setDataMode(SPI_MODE0);. GPOS/GPOC are DMA registers for the Setting/Clearing the GPIOS. Be car...
by Conjur
Fri Aug 05, 2016 6:20 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: KeDei 3.5 inch 480x320 TFT lcd from ali
Replies: 235
Views: 200688

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

So, as it turns out, the colors are normal; just had to write a separate spi write block for them, so the LSB wasn't pushed into the control byte.. Below is a fully functional Arduino program for an ESP8266, that will init a KeDei v5.0 display, and cycle through a bunch of colors, with a big plus in...
by Conjur
Thu Aug 04, 2016 2:57 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: KeDei 3.5 inch 480x320 TFT lcd from ali
Replies: 235
Views: 200688

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

For those that care, I finally got around to building a logic analyzer for the KeDei v5.0. It handles data very strangely, IMO; It looks like they made a boo-boo on the board, and fixed it with software. The entire log is attached; first column is the data, second column is microseconds*250 from the...
by Conjur
Mon May 02, 2016 7:16 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: How do I read the current core clock speed from the SOC
Replies: 2
Views: 1340

How do I read the current core clock speed from the SOC

I need the ability to read the current core frequency from C. I do not want a bloated library, nor to execute a script and scrape the output (vcgencmd), nor to read the startup value from config.txt I have looked through the registers, and can not find anything. I need to calculate spi dividers dyna...
by Conjur
Sat Apr 30, 2016 8:33 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Most efficient GPIO/SPI possible in C
Replies: 9
Views: 1403

Re: Most efficient GPIO/SPI possible in C

Oh dear. Is this a Pi3? If so you can force the core clock to 250MHz I believe. If it's a Pi3 problem then it is disappointing. My development pi is a pi 3b, the ones on the TVs are all 2b's. As far as I know, the default core speed is 250Mhz on both. I changed the 3 to 400. I would still like to k...
by Conjur
Sat Apr 30, 2016 3:46 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Most efficient GPIO/SPI possible in C
Replies: 9
Views: 1403

Re: Most efficient GPIO/SPI possible in C

I can confirm that core_freq affects the SPI clock. When I have the core freq at 400, the lowest SPI divider I can get to work is 12 (33.3Mhz), with pixel data corruption at 10 (40MHz). At 250, it works great at 8 (31.25Mhz), with pixel data corruption at 6 (41.6MHz). I have no good reason to run a ...
by Conjur
Sat Apr 30, 2016 3:06 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Most efficient GPIO/SPI possible in C
Replies: 9
Views: 1403

Re: Most efficient GPIO/SPI possible in C

I found the source of the issue with the copy of your minimal_spi code that I pulled from the forums. the hardcoded memory locations were setup for an earlier version of the raspberry pi; apparently the mapping changes from 0x2000 0000 to 0x3F000 0000 on the RPI 2/3. now, as a bit of a perfectionist...
by Conjur
Fri Apr 29, 2016 3:21 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Most efficient GPIO/SPI possible in C
Replies: 9
Views: 1403

Re: Most efficient GPIO/SPI possible in C

Not 50 times per second; 50 times per use. Initial touch interrupt, screen update, release interrupt, screen update (and periodic updates depending on the button pressed) I can get away with only running it twice per event ; but constant screen feedback considerably improves the feel of the device. ...
by Conjur
Fri Apr 29, 2016 2:21 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Most efficient GPIO/SPI possible in C
Replies: 9
Views: 1403

Most efficient GPIO/SPI possible in C

I am working on an LCD CLI, that runs completely separate from the main interface (events and Hdmi). It's purpose is to provide a control interface for the pi (power, volume, crashed Kodi recovery, etc) Currently from C, I am using wiringPi and the bcm2835 libraries for GPIO control, feeding the ILI...
by Conjur
Tue Apr 26, 2016 2:52 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Dual screens (any kind) for 3D?
Replies: 4
Views: 862

Re: Dual screens (any kind) for 3D?

Personally, I would write the code to display 2 images, side by side, in a single frame buffer; then "copy" portions of the framebuffer to 2x SPI-based TFT screens in userspace. I am assuming that you are making a pair of 3d goggles, basically.. so each eye will have a separate 240x320 tft in front ...
by Conjur
Sun Apr 24, 2016 3:02 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: KeDei 3.5 inch 480x320 TFT lcd from ali
Replies: 235
Views: 200688

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

:lol: spyware? lol. I found the standalone driver in kedei website: http://en.kedei.net/raspberry/raspberry.html Its contains a spyware too? First, the "driver" is not driver, this is a complete kernel with modules (and some script to swap kernels&modules...) - it's compiled. AS for spyware - I don...
by Conjur
Thu Apr 21, 2016 1:30 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: KeDei 3.5 inch 480x320 TFT lcd from ali
Replies: 235
Views: 200688

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Hello, I have KeDei v5.0 (the 2016 version) and I want to run the RetroPie, but its not working. And another question, is possible to increase the frequency of the display? Thanks GAMERLASTER, I have 2 of the same displays (Kedei v5.0); and writing a SPI Logic Analyzer for one of my FT232 chips is ...
by Conjur
Tue Apr 12, 2016 9:46 pm
Forum: General discussion
Topic: filesystem write files - after reboot the old data is back
Replies: 34
Views: 7598

Re: filesystem write files - after reboot the old data is ba

Simple Solution: create a small partition (like 1mb) on the sd card (say... /dev/sda4), and mkfs.ext4 /dev/sda4 I have not confirmed this script, so it may have stupid errors, but in theory; if the SD card is not retaining data, it will NOT retain data through umounting and mounting. If the data is ...
by Conjur
Mon Apr 11, 2016 8:32 pm
Forum: General discussion
Topic: filesystem write files - after reboot the old data is back
Replies: 34
Views: 7598

Re: filesystem write files - after reboot the old data is ba

Another possibility is a fake sd card. Chinese 8gb sd cards only hold about 3g before start ignoring writes.
by Conjur
Mon Apr 11, 2016 7:15 pm
Forum: Troubleshooting
Topic: Having a USB hub challenge with Pi Zero
Replies: 34
Views: 9633

Re: Having a USB hub challenge with Pi Zero

Interim solution: connect via the UART header, with the WiFi dongle plugged in to the USB port.
by Conjur
Wed Apr 06, 2016 9:24 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: KeDei 3.5 inch 480x320 TFT lcd from ali
Replies: 235
Views: 200688

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

I have done a bit of optimization on the c code from the OP, to make a CLI interface for the v1.1 display. It also requires the bcm library from http://www.airspayce.com/mikem/bcm2835/ and must be ran as root. the CLI can: initialize the display (obviously) send a test pattern to the display send an...

Go to advanced search