Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 06, 2016, 10:48:16 22:48


Login with username, password and session length


Pages: [1]
Print
Author Topic: BASCOM AVR and Proteus -> LCD  (Read 5828 times)
0 Members and 1 Guest are viewing this topic.
kcwcc
Junior Member
**
 Muted
Offline Offline

Posts: 43

Thank You
-Given: 37
-Receive: 3


« on: December 04, 2007, 09:13:56 21:13 »

Does anyone have a sample of using the LCD routines from BASCOM in a Proteus project? I always get errors in Proteus saying that the controller is receiving commands whilst busy...I would like to see an AT90S2313 with a 16x2 HD44780 LCD using the sample program LCD4.bas working in Proteus...I had the same issue using MikroBasic for PICs and ended up writing my own LCD routines...most annoying...any hints on getting this to work would be great.

FWIW: i used the same proteus project but compiled some simple code using CodeVision AVR 1.25.7a Professional and it worked fine...it has to be that the Bascom LCD routines require a delay.
« Last Edit: December 04, 2007, 09:52:27 21:52 by kcwcc » Logged
o2
Moderator
Hero Member
*****
Offline Offline

Posts: 503

Thank You
-Given: 23
-Receive: 403


Top Topic Starter


« Reply #1 on: December 05, 2007, 03:59:59 03:59 »

at http://www.sonsivri.com/forum/index.php?topic=6186.0
my attachment (Tank.rar ) sample project using bascom and proteus

I hope help U
Regards

O2
« Last Edit: December 05, 2007, 04:18:15 04:18 by o2 » Logged
kcwcc
Junior Member
**
 Muted
Offline Offline

Posts: 43

Thank You
-Given: 37
-Receive: 3


« Reply #2 on: December 06, 2007, 04:15:41 16:15 »

OK...you have proven that it can work...now to figure out why your's works and mine does not...thanks
Logged
shailesh5
Translator
Junior Member
***
Offline Offline

Posts: 41

Thank You
-Given: 56
-Receive: 3


« Reply #3 on: December 06, 2007, 04:31:22 16:31 »

include delay after you send a command to the lcd according to your lcd
shailesh
Logged
kcwcc
Junior Member
**
 Muted
Offline Offline

Posts: 43

Thank You
-Given: 37
-Receive: 3


« Reply #4 on: December 10, 2007, 04:56:25 16:56 »

Yes, I pointed that out in my first post. Either way, it wasn't an issue, I was only pointing out something I came across just playing around and wondered if it was peculiar to my software mix...LCD4 does not work in Proteus while LCD4Busy works fine. I think that LCD4 should have delays inserted by the compiler based on the crystal frequency...and maybe it does.
Logged
cacheeda
Newbie
*
Offline Offline

Posts: 14

Thank You
-Given: 21
-Receive: 7


« Reply #5 on: December 11, 2007, 11:17:20 11:17 »

Hi O2..

I was try your example of AVR with Proteus, and I am very interesting with tahat.
Can you teach me more about AVR?..

..cacheeda..
Logged
pushnoi
Guest
« Reply #6 on: December 11, 2007, 10:38:56 22:38 »

FWIW: i used the same proteus project but compiled some simple code using CodeVision AVR 1.25.7a Professional and it worked fine... it has to be that the Bascom LCD routines require a delay.

Check asm listing for it.
Logged
o2
Moderator
Hero Member
*****
Offline Offline

Posts: 503

Thank You
-Given: 23
-Receive: 403


Top Topic Starter


« Reply #7 on: December 13, 2007, 09:53:14 09:53 »

hI,kcwcc

Quote
Does anyone have a sample of using the LCD routines from BASCOM in a Proteus project? I always get errors in Proteus saying that the controller is receiving commands whilst busy...I would like to see an AT90S2313 with a 16x2 HD44780 LCD using the sample program LCD4.bas working in Proteus...I had the same issue using MikroBasic for PICs and ended up writing my own LCD routines...most annoying...any hints on getting this to work would be great.

if you use sample lcd4.bas,you must be to inactive $sim,and sample LCD4 ( bascom & Proteus )at attachment

Regards

O2


Logged
kcwcc
Junior Member
**
 Muted
Offline Offline

Posts: 43

Thank You
-Given: 37
-Receive: 3


« Reply #8 on: December 13, 2007, 05:55:58 17:55 »

Ah....yes, that explains it...thank you...I looked at the file and didn't see the $sim...stupid mistake on my part...I just use LCD4BUSY...which I kind of like better since I normally read from the LCD anyway...thanks again!
Logged
picavr
Active Member
***
Offline Offline

Posts: 169

Thank You
-Given: 184
-Receive: 100


« Reply #9 on: December 27, 2007, 01:18:18 13:18 »

you must place a minimum of "delayms 5ms" after sending a control instruction
Logged
joprinz
Newbie
*
Offline Offline

Posts: 34

Thank You
-Given: 10
-Receive: 11



« Reply #10 on: April 23, 2008, 01:07:25 01:07 »

Interfacing 16 x 2 or 16 x 4 LCDs are generally easier compared to GLCDs n Color GLCDs...Heres my setup of a ATMEGA32 interfaced to a 16x2 LCD.Hope You can get some ideas from the setup. Good Luck with your project  Smiley
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC