Author Topic: WebbotLib generic display problem  (Read 2523 times)

0 Members and 1 Guest are viewing this topic.

Offline constfangTopic starter

  • Beginner
  • *
  • Posts: 5
  • Helpful? 0
WebbotLib generic display problem
« on: August 12, 2010, 06:28:54 AM »
Dear Webbot,
I am having some problem with the generic display (HD44780). From Project Designer, I chose 50$ Atmega168 and added the LCD device as (1) in the attached image. I left the code almost untouched, only modifying the appControl in order to test the LCD:
Code: [Select]
TICK_COUNT appControl(LOOP_COUNT loopCount, TICK_COUNT loopStart) {
displayGoto(&display,0,1);
rprintf("fshklfd");
rprintfStr("fdshf");
rprintfChar('c');
return 10000;
}
Then I used Proteus to simulate, configuring the MCU like in (2). The simulation (3) shows that the ports are actually work (red and blue) but still not a single letter show up. The simulation warnings is shown in (4), I tried lowering the clock frequency to 128kHz (just the MCU, the same hex file is used) but that doesn't work either, the same warning came out. To make sure that this is not Proteus's fault, I tried Codevision's code and the lcd worked. I then tried it all over again with other boards but not a single one works on Proteus (once again, I believe that it's not Proteus's fault) I'm pretty sure that whether it is something wrong in the software or maybe I was missing something critical.

To rule out the possibility that it was Proteus's fault, I decided to use my real atmega128 board, I created the board (file attached) by Board Designer and used it with Project Designer, but this time, it couldn't even complied, (in external dependencies, only libm.a and libc.a shown up, even after the failed compilation) Because of this, I couldn't test it with my real board. Anyway, could you have a look at it? the parallel LCD display and the customized board, I don't know where was I wrong.


Sorry, the image is too large (0.5MB), please see it here: http://img530.imageshack.us/img530/8681/49909659.jpg

Anyway, I really appreaciate your contribution, this lib is HUGE, the world really needs more guys like you. Thank you very much.

Attachment list:
- AM-128PRO.brd is the board I made that is failed to compile when used with Project Designer
- lcd.rar is the successfully compiled code but doesn't work
- lcd2.rar is the failed to compile code

http://www.mediafire.com/?ibs7ux137aqshh2
http://www.mediafire.com/?d6cywohl7tc0gs8
http://www.mediafire.com/?76zvhk77uum6xj0
« Last Edit: August 12, 2010, 06:31:03 AM by constfang »

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: WebbotLib generic display problem
« Reply #1 on: August 12, 2010, 07:48:44 AM »
The compile problem on the 128 board was down to ATmel using different names for the vectors on the 128 - bless them.
So I've fixed it in the Project Designer code generation.

I suggest you make a couple of changes in Board Designer first....
1. Change the name of 'uart' to 'uart0' - otherwise you may get some other compile errors - its a long story
2. Change the name of the on board led from 'led' to 'statusLED' and then it will automaticallyt get registered as the LED to flash out any runtime errors

Then
Re-run Project Designer (whilst online so that it downloads the fix) - re generate the code and it should now compile.

Still looking at the other questions...

(EDIT) have you tried it with 8 data lines rather than 4 ? Both should work but would be interesting to know if Proteus is happier with the 8 bit
« Last Edit: August 12, 2010, 08:51:04 AM by Webbot »
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline constfangTopic starter

  • Beginner
  • *
  • Posts: 5
  • Helpful? 0
Re: WebbotLib generic display problem
« Reply #2 on: August 12, 2010, 10:20:29 AM »
Wow, it actually worked. I mean, it compiled, and the letters does show on the real LCD. However, it still doesn't work on Proteus; in 8bit mode, I get more "read/write nibbles" warning (around 1000warns/sec) and no letter shown up. Anyway, for me, as long as the real one works then it's fine, but probably you would want to warn people about this. It was my first try on Webbotlib and I almost gave up on it because of these very fundamental problems.
Thank you for your help.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: WebbotLib generic display problem
« Reply #3 on: August 12, 2010, 11:10:06 AM »
Glad you got it going.

The reason for asking you to try 8 bit mode is that it doesn't then read/write nibbles at all. So quite why Proteus is still chucking out messages about nibbles defeats me. The fact that it works in practice indicates, to me at least, that its more of a problem in Proteus.  :o

Perhaps if I'm nice to them - they may let me have a trial copy.  ;D

Thanks for your perseverance.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

 


Get Your Ad Here

data_list