Hi Martin (smith),
I posted the original question in my work mates profile, this is the real me!
Sorry for the delay, i've been putting comments in and tidying up the code. As i've said i'm fairly new to this C lark and there were a few repeated sections that i've turned into functions to shorten things a bit, i'm sure its still not ideal by a long shot and any comments on how to improve it (code structures etc) would be welcome.
It seemed a bit long to post it so i've published it here medica_demo_V10
The interrupts used are external:
2 x hall effect sensor counters that are only active when the actuators are moving and are triggered by a rising edge.
1 x push button in, rising edge
1 x opto sensor in, rising edge
The screen is only addressed when the system is at rest so these interrupts shouldn't have an effect on the refresh rate of the lcd. ie when the screen is addressed the processor is doing nothing else.
By the way did you finish your final year at ARU this year?
simon
I'm currently using an mbed in an exhibition demo unit. The unit controls a couple of DC linear actuators (with hall effect for position feedback), has an opto sensor input, a couple of pots in, a load of switches, an alarm out and a 20 x 4 LCD for readout for the HMI. The unit is working and the mbed has been a great tool in getting a fast result :)
All the lcd functions work, i'm displaying everything correctly, positioning correctly (anywhere on any line), the lcd.cls() works so all is well ....... except for the LCD refresh speed. It takes about 1.5 second to refresh an entire screen which is easily noticeable to the user.
I'm a newbie to C as have been using pics and assembly language up till now but i have used this screen with a pic before and got much quicker refresh rates out of it.
Has anyone else experienced this? Is it a result of the lcd.printf(). I've imported the textLCD library as files to look through it, i understand some of it but cannot fathom how to speed up the printf (if at all possible).
Is this me?? any help would be greatly appreciated
(in the process of trying to upload a pic as we speak)