HYSTM32_28 examples #3443
Replies: 20 comments
-
Posted at 2013-11-06 by @gfwilliams There's some touchscreen code here: http://www.espruino.com/Touchscreen I'm in the process of redoing the projects for the Espruino board at the moment though. There's always this one: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2013-11-06 by user6141 Ah, thank you. This was the Demo I was looking for. The hardware difference seems to be with the SPI pins. At least with the Project 2 code that also sends SPI to the LED strips. I was not too concerned with that, because I thought the SPI stuff is just for the Touchscreen input. The Display should work independently. This does not look right: (after loading the Touchscreen demo)
I suppose LCD should get initialised by boards/HYSTM32_28.py? PS: Screen stays grey throughout. When I bought the board it ran a demo, that displayed fine in case it could be some analogue trimming issue. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2013-11-06 by @gfwilliams Hi, Have you just tried doing something on the LCD? Built-in objects are handled in a special way to save RAM, so if you query them from JavaScript they'll come up empty. You'll have to check on the reference: http://www.espruino.com/Reference Is there no text displayed on the LCD at startup at all? Normally at startup Espruino should display some text in the top left. It's possible that the board has a different LCD to normal. The 2.8 board is pretty useless really - it's got a surprisingly small processor given the LCD that it's got to drive. Given there's so little flash, code has to be left out to get Espruino (and the fonts/etc) in. Also, different batches of the same 'HY' boards seem to have different LCDs - the driver has to support several different controllers. I think you've asked about compiling the software yourself? If so, you could try editing libs/graphics/lcd_fsmc.c and removing the '#ifndef SAVE_ON_FLASH' lines. This should add support for other LCD types and might make it start working. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2013-11-06 by user6141 I didn't really reflect too much on the hardware choice. I saw the demo and went onto eBay. :) I must have a different LCD. The material on the CD is all Chinese, I found two .pdf for two different display controllers. A ILI9320 and a SSD1289. No idea which one it is. I can rebuild. Once I removed the SAVE_ON_FLASH lines, will it auto-probe or do I need to tell it somehow what to try? The board isn't too expensive to not buy a new one if it turns our to be useless. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2013-11-06 by user6141 Sorry this turns out to be a support nightmare. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2013-11-06 by user6141 I had a look at the display board. The only chip I can find on that is the XPT2046 touchscreen controller. PS: This one http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=180819025871&ssPageName=ADME:L:OC:GB:3160 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2013-11-06 by user6141 $ cat /media/cdrom/uCOS_DEMO_V3-5408/Source/uCGUI/Config/LCDConf.h |
Beta Was this translation helpful? Give feedback.
-
Posted at 2013-11-06 by user6141 Sorry for spamming. I'm just going to dump a few hints here. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2013-11-06 by @gfwilliams Are you sure those comments are actually correct? Maybe check the PDF schematics that come with it... Just a note for anyone else, but the following will give the LCD device codes if it is connected to FSMC. The 2.8" board doesn't have FSMC so it's useless for you though.
The board sure looks different to the 2.8" one I have. The SD card connector is on the rear, rather than on the LCD board - so it wouldn't surprise me if the LCD connections were different. This is another reason for having 'the one true Espruino board' - while cheap, the HY boards seem to change randomly and without warning. Potentially you could:
Hope that helps - sorry I can't do it for you but I have my work cut out doing the KickStarter board. edit: Having a way to define the pins used for the LCD would help everyone out, and might let us support more boards more easily in the future. In fact it'd be even better if the bit-banged LCD driver could be instantiated at runtime - and then it could be used directly from the Espruino board :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2013-11-06 by @gfwilliams Just a quick note that you could actually write a driver in JavaScript if you want to get it working quickly. As long as you can make a function that writes a pixel to it, you can use: http://www.espruino.com/Reference#l_Graphics_createCallback to create a graphics object that'll output direct to the LCD (it'll be quite slow though). |
Beta Was this translation helpful? Give feedback.
-
Posted at 2013-11-06 by user6141 I understand. I will have a dig around and report back when or if I get it to work. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2013-11-06 by @gfwilliams Thanks - I know, they're nice boards. Especially the 3.2". I've updated the http://www.espruino.com/Other+Boards page in case anybody else falls into the same hole. My guess is they've swapped everything around so they could use the whole of port B for the data - the other one was a pain (using half of port B and half of port C). While it'd be nice to get a solution that works for everything, you could actually just modify your version of lcd_fsmc.c to use the correct pins for your board. It should be pretty quick to do. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2013-11-06 by user6141 I have limited time right now to concentrate deeply on it myself (slacking at work) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2013-11-06 by user6141 RS and CS seem swapped |
Beta Was this translation helpful? Give feedback.
-
Posted at 2013-11-06 by @gfwilliams Had a very quick check, and at the very least the pins CS and RS are swapped - RD/WR/data look fine! It may be that you can just swap the following lines of code in lcd_fscmc.c and it will work:
to
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2013-11-06 by user6141 Looked like we cracked it. But no such luck. Not yet. Thanks for your help so far. Very much appreciated. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2013-11-06 by user6141 I nearly forgot to mention. This might be relevant
I never thought much of it because writing went without error and Espruino seems to boot fine afterwards. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2013-11-11 by @gfwilliams You're not ever specifying |
Beta Was this translation helpful? Give feedback.
-
Posted at 2013-11-11 by user6141 Sorry, I lead you down the garden path there. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2013-11-11 by @gfwilliams No idea then - best bet would be to uncomment the `` jsiConsolePrint |
Beta Was this translation helpful? Give feedback.
-
Posted at 2013-11-04 by user6141
I'm pretty sure I have seen some code examples for the HYSTM32_28 board on the site.
But I can't find it any more.
Beta Was this translation helpful? Give feedback.
All reactions