Show Posts
Pages: [1] 2 3 ... 6
1  Using Arduino / Storage / Re: SD card + TFT 3,2" on: April 09, 2014, 05:00:53 pm
I find it strange that Sainsmart is still producing these boards with errors.

Thanks in advance,
JMR smiley-sad

So do I!! My V1.0 Sainsmart board ordered 23/10/12 worked straight out the box with none of the problems everyone else seems to have had with this board!!

Regards,

Graham
2  Using Arduino / Displays / Re: Problem with UTFT bitmap buttons and setFont on: February 28, 2014, 02:20:37 pm
Sorry I couldn't be more help, and I did spend quite a large portion of today working on this to try to make amends for my previous mis-information  smiley-sad I agree this does seem to be a fairly big problem, with limited successful solutions, and even with what I have read and discovered, I think to implement some of the suggestions would require additional input from Henning, who I know from past dealings is not keen to make big changes for small audiences..... So just for information really if nothing else, and if you are committed to the MEGA maybe this will serve you in future projects....

http://forum.arduino.cc/index.php?PHPSESSID=2ohs6febc03cn3u0k753e69om4&topic=146211.0

The reason why your sketch works on the DUE and not the MEGA is sort of what I thought(ish)... compare these two pages :-

http://coverclock.blogspot.co.uk/2012/02/arduino-data-types.html

http://coverclock.blogspot.de/2012/12/arduino-due-data-types.html

I do like the idea of multi segmented PROGMEM statements utilizing #include <morepgmspace.h> but I dont see how that could easily be implemented with UTFT....

Best wishes,

Graham
3  Using Arduino / Displays / Re: Problem with UTFT bitmap buttons and setFont on: February 28, 2014, 10:20:34 am
My knowledge of these things is not sufficient to explain clearly to someone else, I just know enough to get by and understand why its not working. Try looking at this link and some of the others in this reference document http://www.atmel.no/webdoc/AVRLibcReferenceManual/group__avr__pgmspace_1ga73084a8bbde259ffae72980354b3f027.html.

Someone with a greater understanding of this stuff than me................could possibly tell you how to work around this on the MEGA. If you look inside UTFT.cpp,  you will find there are a few uses of
Quote
pgm_read_byte
, specifically UTFT::printChar and UTFT::rotateChar both of which are used by UTFT::print. Additionally in UTFT::drawBitmap, you will see
Quote
pgm_read_word
is used which is how your images appear on your buttons.

I can't explain why the same code works fine on the DUE but not on the MEGA, my tentative personal suspicion is that maybe 'word' = 32 bit on the DUE but only 16 bit on the MEGA.

Not sure if this is helpful to you, but it is the best I can figure at the moment.........

Regards,

Graham
4  Using Arduino / Displays / Re: Problem with UTFT bitmap buttons and setFont on: February 28, 2014, 09:05:40 am
I am very sorry to have got your hopes up  smiley-cry On further investigation, you are correct, it is not happy on the MEGA2560. But if it is any consolation, it works fine on Arduino DUE. The problem is the address space of all of your images and the font exceed 16bit (i.e. > 0xFFFF) which appears to be a problem on the MEGA2560.

My suggestion is to reduce the size of 'plant.c' as that is a fairly enormous 22K.... which is more than a third of your total addressable.....

I have included here my revised sketch including address dumping to serial monitor should you wish to investigate further.

Very sorry,

Regards,

Graham

(TinyFont is just in case you want to play with all options)
5  Using Arduino / Displays / Re: Problem with UTFT bitmap buttons and setFont on: February 27, 2014, 03:34:13 pm
Using your sketch, except modified to use ITDB32S display......



Am I missing something? It appears Henning was right as usual... smiley-wink

Regards,

Graham
6  Using Arduino / Displays / Re: [SOLVED] CTE TFT with font ic, what size are the fonts please? on: February 27, 2014, 02:17:23 pm
Hi Gary,

Thanks for that extra snippet of information! Very interesting and I will definitely look into it.

Regards,

Graham
7  Products / Arduino Due / Re: SdFat for Due posted on: February 27, 2014, 08:46:33 am
I have SD.h for now, and I'm not sure how I can get SDfat library.

Please let me know if you have any more suggestions. Thanks again.


-Simon

Hi Simon,

You can look here for sdfatlib https://code.google.com/p/sdfatlib/.

The only other comments I have is that there is always the possibility the SD card you are using is a bit naff? I had a cheap ebay job that would not work with SD.h but did work with sdfatlib at slow speed.

Finally, did you try the 'CardInfo' example? This should tell you at least that the card is detected and wiring is correct, it will also initialize with SPI_HALF_SPEED by defualt, which will go some way towards proving if the SD card is not so good.

Quote
Initializing SD card...Wiring is correct and a card is present.

Card type: SDHC

Volume type is FAT32

Volume size (bytes): 3518857216
Volume size (Kbytes): 3436384
Volume size (Mbytes): 3355

Files found on the card (name, date and size in bytes):

You do NOT need to bother 'trying' 4,10,52 as your SS pin...............on the coldtears shield it IS 53 !! PERIOD.

If this still does not help you, beg/steal/borrow a different SD card, preferably SanDisk, Transcend, Kingston ..... even only 1GB or 2GB at least until you are confident of your hardware and software arrangement.

Regards,

Graham
8  Products / Arduino Due / Re: SdFat for Due posted on: February 25, 2014, 12:44:05 am
Hi Simon,

Quote
However I get an "initialization failed" error message from the code, which means that the DUE failed to write to the SD card.  After reading several documentations, I suspect that pin 4 and 10 are indeed the right ports to read/write, but I could be wrong...

There "initialization failed" error message does NOT mean the DUE failed to write to the SD card, it did not even get past initialization.......

"I suspect that pin 4 and 10 are indeed the right ports to read/write", clearly you have misunderstood how SPI access to the SD card works, MISO/MOSI are the data in/out ports and are NOT pins 4 or 10. You should read up some more about SPI http://arduino.cc/en/Reference/SPI but in a nutshell, the gist of it is this, you have a clock, data in and data out which go to ALL SPI devices, the only pin that changes and thus allows you to access a specific device is the CS(SS) pin

There are a couple of things you need to check.    

Taken from "DUE_Shield_readme.txt"
Quote
Shipping default jumper configuration:

The TFT/SD Shield for arduino DUE is shipped with the following jumper config, if you use TFT modules in our store, you do not need to reconfig the jumpers.

LCD Vcc - 3.3V (JP2 shorted)
LCD backlight (LEDA+) - 3.3V (JP4 shorted)
arduino Pin32 to TP_DIN (JP10 opened)
On board SD - disabled (JP8 opened)

NOTE JP8 opened/on board SD - disabled. !!!!!   Did you put a solder blob on JP8?

Assuming you did, the next thing to check is that you changed both entries relating to CS(SS) in your SD code :-

Code:
 Serial.print("Initializing SD card...");
  // On the Ethernet Shield, CS is pin 4. It's set as an output by default.
  // Note that even if it's not used as the CS pin, the hardware SS pin
  // (10 on most Arduino boards, 53 on the Mega) must be left as an output
  // or the SD library functions will not work.
   pinMode(10, OUTPUT);
  
  if (!SD.begin(4)) {
    Serial.println("initialization failed!");
    return;
  }
  Serial.println("initialization done.");

As a self-confessed newbie, did you pick up on the misleading error in the example??

pinMode(10, OUTPUT); & if(SD.begin(4)) {  ??

The 10, and 4 relate to the same pin and therefor SHOULD at least be the same, in your case 53!

The coldtears shield is exactly what I have if you read the very post before yours, and it works fine with both SD and SDFATLIB once you bridge JP8, and use pin 53 as SS.

Best wishes,

Graham
9  Products / Arduino Due / Re: SdFat for Due posted on: February 24, 2014, 02:52:53 pm
Is there a reason, why I can`t run on FULL_SPEED?
Or has anybody a tip how to get a better performance?

Hi Rob,

There is a possibility that your SD shield uses resistor level shifters, this appears to be the biggest stumbling block preventing successful use of SPI_FULL_SPEED, however, there is also the possibility that the SD card you are using might not be up to it?

I have a Fujifilm Class 4 SDHC 8GB card, and also a SanDisk Class 4 Micro SDHC 4GB card, both of which work successfully with the ColdTears(CTE) TFT/SD/TOUCH Shield.

For your own reference using your figures, 50MB file, 32768 buffer size, I get the following speeds :-

Fuji 8GB
Write  3100KB - 3320KB  Read 3887KB - 3905KB
SanDisk 4GB
Write  3452KB - 3628KB  Read 4320KB - 4338KB

I have a further point I would like to mention which although is not directly related to the sdfat library, I did notice the differences when running the sdfatlib benchmarks.

When compiled on IDE 1.5.4 the bytes written to flash was 22340  with #include <SPI.h>  22456
When compiled on IDE 1.5.5 the bytes written to flash was 22492  with #include <SPI.h>  22616
Furthermore, without the SPI library, free RAM is 62751 for V1.5.4        and    62751   for V1.5.5      
however,                with the SPI library, free RAM is 62703 for V1.5.4 but only 62699 for V1.5.5

The use of #include <SPI.h> in the above tests, did not demonstrate any noticeable differences in performance.

Conclusion :- V1.5.4 produces a smaller flash image and uses less RAM in certain cases, I no longer have older IDE's to continue this testing, has anyone else noticed any similar differences?

Regards,

Graham
10  Using Arduino / Displays / Re: CTE TFT with font ic, what size are the fonts please? on: February 24, 2014, 01:52:48 pm
Hi Graham,

The last W would not be vertically aligned.
I have attached to photographs for you.
Of course, you can use fonts drawn by the Arduino, but there may a speed penalty by not using the on-board font IC.

I use TFT displays, Only one of my displays has a font IC on it.  It is quicker to write text using the font IC.
It would depend on your requirement.

See attached pics.



Hi Gary,

Thanks very much for your help that answers my question.

My original motive behind asking, was that I wondered if it would be possible to emulate the font ic in software, but I see that is not possible since the UTFT soft fonts are fixed space.

Regards,

Graham
11  Using Arduino / Displays / Re: CTE TFT with font ic, what size are the fonts please? on: February 04, 2014, 08:25:35 pm
Hi Gary,

Many thanks for your response, as you see I have been waiting quite a while....

Ok I take your point about proportional font, and of course I understand that 'W' will be wider than 'T', however...

Could you possibly try this for me? If you make a few rows of a few characters, does the horizontal allignment actually vary?  eg

WWWWW
IIIIW
TTTTW
AAAAW

That represents 4 characters and W, what I am asking is the last W horizontally aligned or does is alter as shown here?

Thankyou and regards,

Graham
12  Products / Arduino Due / Re: Due GUI (Graphical user interface) - [now community project] on: January 06, 2014, 02:59:37 pm
@Vasilis, WOW!! I read quite a bit of your Raspberry PI PLC thread, very well done!  smiley I have not got a Raspberry Pi although I am aware of what they are of course...... I often wondered why I would want one when my computer does everything better/faster than the computer aspect of the PI, and my Arduino DUE does everything better/faster than the microcontroller aspect of the raspberry pi? Feel free to enlighten me if you wish  smiley-wink  I appreciate you are busy as you have previously said, but I wonder if sometime when you can spare a little time if you could possibly help me out with this http://forum.arduino.cc/index.php?topic=208814 please, as nobody else has yet. I don't presently own a CTE display, but I wanted to see what I could do to assimilate assorted UTFT fonts as approximations of CTE fonts? The idea being to give us a hardware independent DUEGUI library that is not reliant on the font ic but can use it if available.

@all, Ok, so back on topic, I have been playing with the optInvisible side of things, and I cannot find any rational explanation why it behaves as it does, it may be a cop-out, but I am not going to try to figure it out any further as I am quite enthusiastic to crack on with the touch calibration screen!

@ediaz Happy new year! You are quiet  smiley

Graham
13  Using Arduino / Displays / [SOLVED] CTE TFT with font ic, what size are the fonts please? on: January 05, 2014, 08:36:47 pm
Hi all,

I wonder if anyone with a CTE 5" or 7" would mind or could possibly give me the dimensions(pixels) of these fonts please?
If I had one of these, I would not need to ask, in the meantime, someone surely could help me out please?

BVS_13
BVS_15
BVS_19
BVS_22
BVS_28
BVS_34
BVS_43
BVS_52
BVS_74
BVS_112

Thanks and regards,

Graham
14  Products / Arduino Due / Re: Due GUI (Graphical user interface) - [now community project] on: January 01, 2014, 04:40:15 pm
Hi Gary

Ok I agree in what you say.
I am not using anything what you did so far. When I have time I will try to understand your concept in DUE GUI but my time is limited in that moment and I want to increase my knowledge in C.  I have the intention If I understand what you are doing to help in any way I can and contribute.
But my mind is still troubling with a high level HMI .

I am 60 years old I am not learning as fast as before and despite the fact that I am in the computer business since 1979 I "learn" C just one year ago and not exercising frequently

Finally I will try to help and stay with all you.
So happy New Year again
Vasili


Vasilis


Hi Vasili,

That is great!!  smiley-grin You have a huge amount of knowledge no doubt, and that is valuable in its own right. Let me give you a snapshot of who I am...... I was 13 back in 1981 when I was introduced to a computer for the first time, it was an Acorn BBC Micro Model 'B', I taught myself BBC Basic, and 6502 Assembly language. I studied electrical and electronic engineering after school, and became an electronics service engineer for the English N.H.S. for around 17 years. My hobby and passion was always electronics, but a close 2nd was computers, and more recently Arduino, I tinkered and played with C back at college, but that was early 1990's, and now I am playing with C++ for fun with the Arduino! I do take your point about not learning at the same pace as when you were younger!!!  smiley-roll-blue smiley-eek-blue smiley-lol

I for one will never criticise you for what you don't know, but I hope you would be prepared to fault find, test, or simply take part in any way you feel able to do so? I have commented previously it is a little disappointing there are not more people showing an interest in this project, because I feel once it is working as Darren originally intended on any hardware UTFT supports, that it will have great potential in various applications??

Regards,

(I am not wishing anyone Happy New Year again, I did plenty of that earlier!! BAH HUMBUG LOL)

Graham
15  Products / Arduino Due / Re: Due GUI (Graphical user interface) - [now community project] on: December 31, 2013, 09:37:19 pm
So unless some with good  knoledge of C. C++ lead this project it will end up with everybody with cut and past makes his version only for himself.

No! That is absolutely not what I envisage, whoever or wherever this library is hosted is not important, who wishes to be lead contributor, and or lead coordinator is not important,  'Kernighan Ritchie' levels of understanding of C, kind of seems to imply less knowledgeable mortals have nothing to offer, which I absolutely disagree with, and finally the whole point of a community project is that ALL suggestions from ANY angle are to be accepted, appreciated, discussed and dealt with appropriately, with the result being uploaded to git? Is that not what an ideal community collaboration is all about?

@cowasaki has already handed over the reigns due to limited time, Henning I think you will find has enough on his plate with his existing projects and maintenance of his various libraries and resources. Git gives us the ability to fork, branch, and monitor any/all changes/variations/additions/deletions and produce useful documentation collaboratively! The repository is public as such is available as a 'free for all' with no control from me, I just hosted it because nobody else had......... I don't see that this has empowered me or nominated me in any way? You may have noticed that  @ediaz and myself have been in dialogue a little while now, and I think it would be more appropriate to have a staging area / brain storming arena away from this forum where trivialities and any/all comments can be made without swamping the forum with tooing and froing of questions/suggestions/test reports etc?

One of the most urgently required imminent updates to this needs to be the dynamic calibration screen, while I accept maybe I am no K&R prodige, I do consider it to be within the realms of my abilities to do this, the major limitation I have, is that I only have 1 display. I am hoping and will need, other people with different flavours of shield and or display to verify the modifications when I have made them, which actually brings this full circle, @ediaz gave me his code to test on my display. He and I already agree something needs to be done about this, and here we are, this is the point you have joined in. Come the time I have dealt with the invisible object problem, and the touch calibration screen, I will be looking for as many as possible different people to test this, not only myself and @ediaz, thus ensuring the ultimate flexibility of the DUEGUI library.

What individuals then chose to do with that library of course will very much be on a 'each to themselves' arrangement. My demo was made by me, for me, on my own display, as a start point to then get down to doing some remedial work on the library itself. The sketch I gave was a work in progress, and in hindsight, maybe I should not have given it you if you are not intending to bring anything back?  smiley-mad smiley-sad

Regards and a VERY Happy New Year everyone!!  smiley-grin

Graham
Pages: [1] 2 3 ... 6