Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 24, 2024, 09:08:38 21:08


Login with username, password and session length


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

Posts: 42

Thank You
-Given: 37
-Receive: 3


« on: December 04, 2007, 08:13:56 20: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, 08:52:27 20:52 by kcwcc » Logged
o2
Moderator
Hero Member
*****
Offline Offline

Posts: 505

Thank You
-Given: 40
-Receive: 405


Top Topic Starter


« Reply #1 on: December 05, 2007, 02:59:59 02: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, 03:18:15 03:18 by o2 » Logged
kcwcc
Junior Member
**
Offline Offline

Posts: 42

Thank You
-Given: 37
-Receive: 3


« Reply #2 on: December 06, 2007, 03:15:41 15: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, 03:31:22 15:31 »

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

Posts: 42

Thank You
-Given: 37
-Receive: 3


« Reply #4 on: December 10, 2007, 03:56:25 15: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: 27
-Receive: 7


« Reply #5 on: December 11, 2007, 10:17:20 10: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, 09:38:56 21: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: 505

Thank You
-Given: 40
-Receive: 405


Top Topic Starter


« Reply #7 on: December 13, 2007, 08:53:14 08: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
**
Offline Offline

Posts: 42

Thank You
-Given: 37
-Receive: 3


« Reply #8 on: December 13, 2007, 04:55:58 16: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: 173

Thank You
-Given: 263
-Receive: 100


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

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

Posts: 33

Thank You
-Given: 10
-Receive: 10



« Reply #10 on: April 23, 2008, 12:07:25 00: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