Re: Anyone interested in an LCD control panel for the Ormerod? October 08, 2014 11:31AM |
Registered: 10 years ago Posts: 256 |
Quote
dc42
Thanks Paul, it's looking good!
If any programmers reading this feel like contributing towards getting this project finished, there is a script that you might like to write. I suspect that it would be very easy to do in awk, but I haven't used awk for several years and I have forgotten how to use it. It could also be done in Python, Java or just about anything else. It's concerned with reducing the amount of space needed to store fonts.
The C++ source file for the font I am currently using is at [github.com]. The file is generated by GLCD Font Creator, and I insert the header bytes manually. After the header, each row corresponds to a character, and comprises a 1 byte count followed by a fixed number of bytes. What I am looking to do is to remove unnecessary bytes from the end of each row such that if the byte count in a row is N, the number of additional bytes in each row is N * C. The value C is the number of bytes per column, which for this font is 2 but will be higher (e.g. 3 or 4) for larger fonts - it's actually H/8 rounded up, where H is the height of the font in pixels. The bytes being removed will always be zero, however some characters will still have some trailing zero bytes (if that were not the case, I would write a simple sed script instead). The comment at the end of each row should be preserved, because I sometimes hand-edit fonts to improve readability.
Any takers?
Re: Anyone interested in an LCD control panel for the Ormerod? October 08, 2014 02:08PM |
Registered: 10 years ago Posts: 14,682 |
Re: Anyone interested in an LCD control panel for the Ormerod? October 08, 2014 06:52PM |
Registered: 10 years ago Posts: 20 |
Re: Anyone interested in an LCD control panel for the Ormerod? October 08, 2014 07:33PM |
Registered: 10 years ago Posts: 859 |
Quote
dc42
That's a nice looking screen, but when you add the cost of the Pi and probably a small network switch (so that you can connect the Duet to a PC as well), it's a £100 solution rather than the £50 solution I was aiming for.
I think I will stick with my original plan. If you or someone else would like to pursue the RPi + web interface option, then it occurs to me that the same web interface might be suitable for mobile devices.
Re: Anyone interested in an LCD control panel for the Ormerod? October 08, 2014 08:12PM |
Registered: 10 years ago Posts: 256 |
Quote
dc42
Thanks Andy, it isn't urgent because I'm still working with the small font and there is enough spare memory for now. In 2 weeks from now, I might need it.
Re: Anyone interested in an LCD control panel for the Ormerod? October 09, 2014 04:56AM |
Registered: 12 years ago Posts: 177 |
Re: Anyone interested in an LCD control panel for the Ormerod? October 09, 2014 05:03AM |
Registered: 10 years ago Posts: 256 |
Quote
dmould
Quote
kwikius
Just to add that if once you learn one ARM mcu architecture then you are well on the way to learning a large number and not limited to 1 manufacturer or ic series.Quote
dmould
[...]
The choice of CPU is predicated to a large extent on what architecture/programming tools you are familiar with and not only the capabilities of the CPU. I'd probably go for a Cypress CY7C67300 - perhaps with external Flash and/or static RAM as a solution for this application, but it would certainly not be worth the learning curve if I wasn't already familiar with it, and I'm sure there are better choices if I was willing to learn a new CPU. The cost of the CPU and support components is in any case probably largely swamped by the PCB, assembly and LCD costs.
Dave
regards
Andy
Similar could be said of MIPS, PIC or 8080 architecture (though the latter has become mutated beyond reason!).
Dave
Quote
dmould
Which is true as far as the main body of the firmware is concerned, but every ARM based SOC seems to have a different method for uploading the initial code, setting up its clocks, initialising external DRAM and driving its on-chip devices, so there are still significant things to learn. Many ARM chips have an on-chip Ethernet MAC for example, but rarely are they driven in the same way. USB is better, with many chips adopting the OpenOCI standards (though even there some require addresses to be physical whilst others use virtual, some allow tables in external memory whilst others must have tables in internal RAM). I love the ARM instruction set, it is so elegant and versatile, especially the way that almost every instruction can be given conditionals and shifts, and the programmer can decide whether an operation sets the condition flags or not. Also the way that any register (except the PC) can be used as a stack pointer is also really great, allowing you to set up multiple concurrent stacks with ease. My only small gripe is that there is no easy way to save the condition code register, which makes multi-word arithmetic loops more complex than they need be, and the way that a subtract operation uses the carry flag the wrong way about (i.e. 3-1 sets the carry, 1-3 clears it).
Dave
Re: Anyone interested in an LCD control panel for the Ormerod? October 09, 2014 05:09AM |
Registered: 10 years ago Posts: 20 |
Re: Anyone interested in an LCD control panel for the Ormerod? October 09, 2014 05:41AM |
Registered: 10 years ago Posts: 14,682 |
Re: Anyone interested in an LCD control panel for the Ormerod? October 09, 2014 06:53AM |
Registered: 10 years ago Posts: 256 |
Quote
dc42
Andy, thanks! I will switch to the larger font now that you have provided that program.
Re: Anyone interested in an LCD control panel for the Ormerod? October 09, 2014 02:17PM |
Registered: 10 years ago Posts: 46 |
Re: Anyone interested in an LCD control panel for the Ormerod? October 09, 2014 07:18PM |
Registered: 10 years ago Posts: 14,682 |
Re: Anyone interested in an LCD control panel for the Ormerod? October 10, 2014 02:10AM |
Registered: 10 years ago Posts: 378 |
Re: Anyone interested in an LCD control panel for the Ormerod? October 10, 2014 04:30AM |
Registered: 10 years ago Posts: 256 |
Re: Anyone interested in an LCD control panel for the Ormerod? October 10, 2014 06:11AM |
Registered: 10 years ago Posts: 256 |
Re: Anyone interested in an LCD control panel for the Ormerod? October 10, 2014 07:57AM |
Registered: 10 years ago Posts: 14,682 |
Quote
kwikius
One issue to be aware of is that 32 bit processors may not use ROM as efficiently for code as 8 bit. However if its rom data such as Font tables then I guess its not a problem..
regards
Andy
Re: Anyone interested in an LCD control panel for the Ormerod? October 10, 2014 08:45AM |
Registered: 10 years ago Posts: 256 |
Quote
dc42
Quote
kwikius
One issue to be aware of is that 32 bit processors may not use ROM as efficiently for code as 8 bit. However if its rom data such as Font tables then I guess its not a problem..
regards
Andy
True. However, nearly all the variables I am using need to be at least 16 bits, and on the 8-bit atmega architecture that I have been using, this results in lots of extra machine instructions because two 8-bit registers have to be used. So I am hopeful that 64Kb flash will be sufficient. Also, the bootloader in the ATSAM is in a separate ROM, so it doesn't take up flash. However, I will prototype using the 256K flash memory version (because there is an inexpensive dev board available for it), and when the firmware is largely complete, I will choose whether to use the 64Kb or 128Kb version for manufacture.
Re: Anyone interested in an LCD control panel for the Ormerod? October 10, 2014 09:32AM |
Registered: 10 years ago Posts: 2,472 |
Re: Anyone interested in an LCD control panel for the Ormerod? October 10, 2014 10:59AM |
Registered: 10 years ago Posts: 14,682 |
Re: Anyone interested in an LCD control panel for the Ormerod? October 10, 2014 11:20AM |
Registered: 10 years ago Posts: 2,472 |
Quote
dc42
Dave, that should all be achievable. I am looking to make the display share the same layout as the web interface, so that it is easy for a user to switch between the two. I think Matt's original web interface design, with my modifications for new features (2-head printing, speed and extrusion adjustment etc.) works well, and I see no need to make major changes to it. So the software I am working on uses the same fixed upper pane and tabbed lower pane. Of course, the amount of information displayed will have to be less than in the web interface in some places, because of the smaller display area.
I will add a macro system (and make it available via the web interface too) to facilitate common tasks, such as preparing the printer for printing (homing axes, heating bed etc.). Your one-touch print function sounds useful too.
Re: Anyone interested in an LCD control panel for the Ormerod? October 10, 2014 12:30PM |
Registered: 10 years ago Posts: 46 |
Re: Anyone interested in an LCD control panel for the Ormerod? October 10, 2014 03:04PM |
Registered: 10 years ago Posts: 14,682 |
Re: Anyone interested in an LCD control panel for the Ormerod? October 10, 2014 03:21PM |
Registered: 10 years ago Posts: 138 |
Re: Anyone interested in an LCD control panel for the Ormerod? October 11, 2014 04:39AM |
Registered: 10 years ago Posts: 256 |
Re: Anyone interested in an LCD control panel for the Ormerod? October 11, 2014 05:02AM |
Registered: 10 years ago Posts: 46 |
Re: Anyone interested in an LCD control panel for the Ormerod? October 11, 2014 09:15AM |
Registered: 10 years ago Posts: 314 |
Re: Anyone interested in an LCD control panel for the Ormerod? October 11, 2014 02:31PM |
Registered: 10 years ago Posts: 1,230 |
Re: Anyone interested in an LCD control panel for the Ormerod? October 12, 2014 03:43AM |
Registered: 10 years ago Posts: 378 |
Re: Anyone interested in an LCD control panel for the Ormerod? October 12, 2014 04:05AM |
Registered: 10 years ago Posts: 256 |
Quote
jstck
Would it be possible to have a few extra pin headers or pads on the pcb for "leftover" inputs/output pins on the processor, for future expansions? Just for the possibility of later adding stuff like buttons, swiches, LED:s or buzzers. Ideal would be a pin header for a a few (3 or so) input pins with onboard pullup/pulldown resistors for easily wiring up hard-buttons, and solder pads straight to the processor for as much as will fit on the pcb.
Re: Anyone interested in an LCD control panel for the Ormerod? October 12, 2014 09:11AM |
Registered: 10 years ago Posts: 2,472 |
Quote
kwikius
Looking good DC42
I somewhat hesitate to say this ( but decided to put it out there!) but what springs to my mind is to use the display for a close up view of what is going on at the print head. ie from a video camera. I appreciate this would definitely amount to feature and cost creep, but the QVGA display is perfect for the task I think. A webcam might work but looks like would need USB2 to get a good framerate, though I am no expert on the subject.
Anyway maybe I should put this in a separate thread?
regards
Andy