RetroBSD

2.11BSD operating system for microcontrollers
It is currently Wed Jun 03, 2020 7:12 pm

All times are UTC




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: tft driver question
PostPosted: Fri Oct 02, 2015 7:23 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Hi, I can see in tft.c demo you open
Code:
(fd = open ("/dev/tft0", O_RDWR))

Then you do
Code:
ioctl(fd, 0xDEAF, data);


Where can I find the tft driver description? Is that just an renamed SPI driver?

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
 Post subject: Re: tft driver question
PostPosted: Fri Oct 02, 2015 7:41 pm 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
The ioctl part of tft driver is not finished yet.
Alex and I are still being working on it.
Currently the only source of information is the sources of the driver itself: https://github.com/RetroBSD/retrobsd/blob/master/sys/pic32/hx8357.c


Top
 Profile  
 
 Post subject: Re: tft driver question
PostPosted: Sat Oct 03, 2015 6:55 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Ok. There is a lot of cheap tft displays available (in my junkbox too).. Hopefully the HX driver will be easy to rewrite for other types too..

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
 Post subject: Re: tft driver question
PostPosted: Sat Oct 03, 2015 10:24 am 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Pito and all,

I liked your 16 bit ADC driver a lot. Now for a dynamic kernel module :)

As far as displays go, it seems to me that the drivers for LCDs are hopelessly difficult to interface with. Probably by design. "Let's keep Yankees out of our Asian turf."

So my suggestion is to create a 'simple' driver for RetroBSD/LiteBSD to drive an attached cheap cell fone. That is a driver which makes html5 or java and then uses the real time web driver interface WebRTC, WebSocket and friends to 'drive' the cell fone that drives the display. You even get a free microphone, speaker, camera, a few buttons and a lot of other misc. crap :).

I just bought one for USD $25. Now all that is needed is output from RetroBSD/LiteBSD to drive it via WIFI (built into fone) or USB (UGH!)

Lots of fun :).

Wiz


Top
 Profile  
 
 Post subject: Re: tft driver question
PostPosted: Sat Oct 03, 2015 10:50 am 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1801
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
TFTs aren't difficult to interface with at all. They're all very very similar in their command set and the way that work. I for one have written an entire display library for chipKIT systems that deals with many different TFTs. It's not hard.

_________________
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".


Top
 Profile  
 
 Post subject: Re: tft driver question
PostPosted: Sat Oct 03, 2015 10:00 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Matt,

I guess the issue I was trying to address is maybe a little different?

As an OEM, I want to be able to have multiple vendors that can supply my display.

As far as I know there are no multiple sourced 'standard' LCD panels for low prices?

Hopefully you know something I don't?

Lots of fun.

Wiz


Top
 Profile  
 
 Post subject: Re: tft driver question
PostPosted: Sat Oct 03, 2015 10:20 pm 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1801
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
It depends on what you term an LCD panel.

An LCD panel with CoG is specific to both the panel and the CoG used. You often get similar panels from different suppliers with the same CoG, so they are generally a drop-in replacement as long as the panel needs the same timing, which for the same size panel is generally the case.

As for bare panels with no CoG, they all work the same way. It's really just a question of the connector and what order the signals are in - and of course the bit depth of the display (18 bpp or 24 bpp - incidentally, they are all 18 bpp, but some have built in dithering to make it appear 24bpp). And maybe some slight tweaks to the timing of the signals.

_________________
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".


Top
 Profile  
 
 Post subject: Re: tft driver question
PostPosted: Mon Oct 05, 2015 5:36 am 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Matt,

Good points.

What I had in mind was: We make a special purpose telephone.

On the front we have a 2x24 LCD character display. Very similar displays are supplied by a large number of different companies. So when our primary supplier got out of the business probably due to pricing getting so low, there were other companies that could supply our display.

As far as I know that is not true for so called 'graphics' displays particularly with touch screens.

There is no commonly available size that is supplied by multiple vendors?

This led to the idea that by putting out html5 or java from our product that data could be sent to some generic 'phone' which provided the display and touch interface. Maybe the 'phone' peaks through a window in our product. Size wise most phones are similar. And the space inside our product could probably accomodate various 'display' phones.

Anyways, that is what I was thinking.

I think it is an idea worth a little more thought? IMHO it would be neat to plug a 'phone' into our RetroBSD/LiteBSD stuff and use it as preferred way to talk to our stuff.

Lots of fun :).

Wiz


Top
 Profile  
 
 Post subject: Re: tft driver question
PostPosted: Mon Oct 05, 2015 10:43 am 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1801
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
I don't see that as a cost effective solution at all. A "cheap" phone, say $50? Verses a TFT screen at maybe $5.

And the phone will be considerably more powerful than the RetroBSD device making it kind of obsolete...

TFTs come in various standard sizes and resolutions, based around fractions (or multiples) of VGA of WVGA. For TFTs with a CoG there are a very limited number of interfaces - SPI, 8 bit and 16 bit (8080 or 6502 variants of the latter two) and many have the ability to switch between the different interfaces. So you can replace a 320x240 ILI9340 with a 320x240 BD663474 and the electrical connections would be the same. Yes, pins may be in a different order, but the pin functions would be the same. The rest is then just a matter of software, and that's where having a system with a standard API to many different drivers helps.

At the moment we have one single TFT driver in RetroBSD, but once that one is done and finished there's no reason not to add others, and then it's just a matter of selecting the right one in the kernel configuration and your software doesn't need to be any the wiser.

The same principle applies to my DisplayCore system - your program never really needs to change - just the constructor for the TFT device to use a different CoG. The rest of your code is (or should be) completely device agnostic.

_________________
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".


Top
 Profile  
 
 Post subject: Re: tft driver question
PostPosted: Mon Oct 05, 2015 7:55 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Matt,

Nice analysis.

I find myself wishing for the plot a point interface of the old IBM PC.

So I can make simple displays of temp. verses time, etc.

I got the old Maximite running and it was pretty good. Worked well :).

But at least for me I would rather hook a cheap cell phone. USD $10+ here, and use that since VGAs are big and many of my older ones are failing, etc.

So the headless box type of operation looks better and better for all my boxes.

While I don't know of any, perhaps there is a serial terminal type Android app in .apk form?

I am not sure I can just plug a USB to serial into an Android and have it work. Haven't tried it so perhaps it does work?

Your comments greatly appreciated.

Lots of fun :).

Wiz


Top
 Profile  
 
 Post subject: Re: tft driver question
PostPosted: Mon Oct 05, 2015 8:08 pm 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1801
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
Yes, there are serial terminals on Android in the play store. As long as you have an OTG phone then they should work fine. You need the host mode cable adapter of course...

There's also bluetooth terminals as well - add a bluetooth dongle to your project (HC-06 say) and communicate with that through serial.

_________________
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".


Top
 Profile  
 
 Post subject: Re: tft driver question
PostPosted: Tue Oct 06, 2015 6:01 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
I've tried several android terminals from store but not happy.. Comm via BT. Can you recommend one?

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
 Post subject: Re: tft driver question
PostPosted: Tue Oct 06, 2015 6:09 am 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Matt,

Are there any serial port apps that you know work?

I have USB <-> serial adapter. So maybe just some wires?

Given the volume of phone numbers, I suspect they will get ever cheaper.

The recent one I bought here has a single circuit board with incredibly tiny connectors for its various parts. Not exactly breadboard friendly!

At least for me Bluetooth looks like RF that requires what is basically a proprietary chip as the RF protocol is pretty complex.

I would rather have open technology in my products when possible.

Right now I am waiting for some enterprising soul to spill the beans on the RF technology inside phones. There 'must' be a rather simple ADC DAC driven RF transceiver that can cover the range of 700-2500 MHz. So there must be some real hardware inside. Especially given the multi-channel operation of cell phones. GPS, WIFI, Phone and Bluetooth all going on more or less at once.

I am not sure us mere mortals are ever going to join that club :).

Lots of fun :)

Wiz


Top
 Profile  
 
 Post subject: Re: tft driver question
PostPosted: Tue Oct 06, 2015 9:55 am 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1801
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
Google the term "SDR"

_________________
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".


Top
 Profile  
 
 Post subject: Re: tft driver question
PostPosted: Tue Oct 06, 2015 10:20 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Quote:
a rather simple ADC DAC driven RF transceiver that can cover the range of 700-2500 MHz

The simplest things ever are the 433/8xxMhz modules, Rx and Tx, which may work analog too. I did it long time back and it works basically. Not much reliable, not an "transceiver" but rather rx and tx, and low range, cheap.
For example> http://www.ebay.com/bhp/433mhz-module
On the other hand there are chips with analog i/o and an RF output, sure.. Analog Devices or Maxim or LT may offer a bunch of such things, sure..
For example http://www.analog.com/en/products/rf-mi ... ansceivers
you may need to add an SPI or I2C codec, also tons of codecs chips available..

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron




Powered by phpBB® Forum Software © phpBB Group

BSD Daemon used with permission