реклама на сайте
подробности

 
 
> Dewpointer
Andrejka
сообщение Jan 2 2009, 19:28
Сообщение #1


Участник
*

Группа: Участник
Сообщений: 18
Регистрация: 7-12-08
Пользователь №: 42 268



Hi, I found a schematic of simple temperature, huminidity and dewpoint measuring cicruit. Originally device uses: Sht11 sensor, AT90S8535 MCU, and HD44780 like 20x4 LCD. In my project I replace Sht11 with Sht15 (from Sparkfun), At90s8535 is replaced with newer Atmega8535 (Atmel datasheets say - this is a at90s8535 direct repalcement). But this device working incorrectly, so I have only "Sht11 Monitor" label on LCD, without sensor readings. If possible please help me with source code.

Source project:







URL:
Source project - http://www.embedtronics.com/sht11/sht11.html
Source code - http://www.embedtronics.com/sht11/shtdemo1.c
Schematic - http://www.embedtronics.com/sht11/SHT11Sch.pdf


My device show only this label:



I tried to simulate device in Proteus simulator but this program show the same screen, without sensor readings, only label.


Thank You!
Go to the top of the page
 
+Quote Post
 
Start new topic
Ответов
B0SC0
сообщение Jan 22 2009, 20:17
Сообщение #2





Группа: Новичок
Сообщений: 3
Регистрация: 20-01-09
Пользователь №: 43 673



I, too, am working on this project and have a problem.

I am using original code, Codevision to compile, AT90S8035-8JI 44 PIN PLCC, 4mhz crystal
20X4 LCD HITACHI COMPATIBLE W/backlight 16 pin connector, SHT11,
PCB that I created.
I have verified all voltages, crystal running at 4 mhz okay.

The problem I am having is the LCD. All character 20x4 are full on blocks. No data. LCD connected to atmel PC0-PC2(lcd pins 4-6) + PC4 - PC7 port(lcd pins 11-14).
In codevision I set the lcd for 20 characters and 4mhz. What other settings do I need to make to at least to get the lcd working right?
I believe hardware is okay, but firmware is not correct.
Go to the top of the page
 
+Quote Post
korobov_michael
сообщение Jan 23 2009, 13:06
Сообщение #3


Частый гость
**

Группа: Свой
Сообщений: 118
Регистрация: 11-03-07
Из: Украина, Харьков
Пользователь №: 26 059



Well, first of all give me please a couple of your code. 


After startup all LCDs have the first string is filled by black blocks, and the second is empty. So if in your LCD all strings are filled try to check the contrast
Go to the top of the page
 
+Quote Post
B0SC0
сообщение Jan 23 2009, 14:05
Сообщение #4





Группа: Новичок
Сообщений: 3
Регистрация: 20-01-09
Пользователь №: 43 673



Цитата(korobov_michael @ Jan 23 2009, 08:06) *
Well, first of all give me please a couple of your code. 


After startup all LCDs have the first string is filled by black blocks, and the second is empty. So if in your LCD all strings are filled try to check the contrast


The code was posted at the beginning of the thread. It is the original code.

The contrast control is fine. I can dim or max the contrast. It is a 4 line x 20 character lcd that is called for in the original project(also posted at the beginning of the thread).

All four lines are just blocks without any data/characters.

Attached is my schematic.

I am new to atmel and I am not sure if I have the initial settings correct for burning this code.

I know the code has been altered to make the data correct, but right now I just want to get the lcd working right.

Thanks

B0SC0
Прикрепленные файлы
Прикрепленный файл  LCD_TEMP.pdf ( 286.65 килобайт ) Кол-во скачиваний: 123
 
Go to the top of the page
 
+Quote Post
Andrejka
сообщение Jan 24 2009, 19:40
Сообщение #5


Участник
*

Группа: Участник
Сообщений: 18
Регистрация: 7-12-08
Пользователь №: 42 268



Цитата(B0SC0 @ Jan 23 2009, 17:05) *
The code was posted at the beginning of the thread. It is the original code.

The contrast control is fine. I can dim or max the contrast. It is a 4 line x 20 character lcd that is called for in the original project(also posted at the beginning of the thread).

All four lines are just blocks without any data/characters.

Attached is my schematic.

I am new to atmel and I am not sure if I have the initial settings correct for burning this code.

I know the code has been altered to make the data correct, but right now I just want to get the lcd working right.

Thanks

B0SC0





Just define which MCU port is connected to LCD. In original code this is a PORT A, but LCD connected to PORT C (mistake?).
Change code to:

CODE
// Alphanumeric LCD Module functions
#asm
.equ __lcd_port=0x15 ;PORTC
#endasm
#include <lcd.h>



Regards
Go to the top of the page
 
+Quote Post
B0SC0
сообщение Jan 25 2009, 04:25
Сообщение #6





Группа: Новичок
Сообщений: 3
Регистрация: 20-01-09
Пользователь №: 43 673



Цитата(Andrejka @ Jan 24 2009, 14:40) *
Just define which MCU port is connected to LCD. In original code this is a PORT A, but LCD connected to PORT C (mistake?).
Change code to:

CODE
// Alphanumeric LCD Module functions
#asm
.equ __lcd_port=0x15 ;PORTC
#endasm
#include <lcd.h>



Regards



Yes, I had already changed that, still no luck.

I also defined in codewizard, lcd,20,4mhz,fast start, no protection, Memory model
Small
External RAM size : 0
Data Stack size : 192


How should I set up codevision c compiler code generator parameters?

I am not sure of all the steps.
I can build all but not sure if all the parameters are right.
Do I need to include math.h,stdio.h,delay.h,along with lcd.h when I build all?

thanks
Go to the top of the page
 
+Quote Post
Andrejka
сообщение Jan 25 2009, 17:50
Сообщение #7


Участник
*

Группа: Участник
Сообщений: 18
Регистрация: 7-12-08
Пользователь №: 42 268



Цитата(B0SC0 @ Jan 25 2009, 08:25) *
Yes, I had already changed that, still no luck.

I also defined in codewizard, lcd,20,4mhz,fast start, no protection, Memory model
Small
External RAM size : 0
Data Stack size : 192


How should I set up codevision c compiler code generator parameters?

I am not sure of all the steps.
I can build all but not sure if all the parameters are right.
Do I need to include math.h,stdio.h,delay.h,along with lcd.h when I build all?

thanks



First I change "sprintf" function features in CodeVision software from "int, width" to "float, width, precision". Twice I change for Mega8535 "Data Stack Size" upto 256 bytes. All headers listed in original code must be included.

Сообщение отредактировал Andrejka - Jan 25 2009, 17:50
Go to the top of the page
 
+Quote Post

Сообщений в этой теме
- Andrejka   Dewpointer   Jan 2 2009, 19:28
- - korobov_michael   I found the following: 1. At initialization, you s...   Jan 3 2009, 06:45
- - ReAl   Цитата(Andrejka @ Jan 2 2009, 21:28) I tr...   Jan 3 2009, 07:30
- - Andrejka   Thanks for reply! Maybe I just simple attach a...   Jan 4 2009, 13:38
|- - _Pasha   Цитата(Andrejka @ Jan 4 2009, 17:38) Mayb...   Jan 4 2009, 14:11
|- - korobov_michael   Цитата(Andrejka @ Jan 4 2009, 15:38) Mayb...   Jan 5 2009, 06:44
- - Andrejka   My Atmega8535 fuses are: CKSEL3..0 - 1111, and I u...   Jan 5 2009, 14:38
|- - _Pasha   Цитата(Andrejka @ Jan 5 2009, 18:38) Sht1...   Jan 5 2009, 18:21
||- - korobov_michael   Цитата(_Pasha @ Jan 5 2009, 20:21) Please...   Jan 5 2009, 18:42
|- - korobov_michael   Цитата(Andrejka @ Jan 5 2009, 16:38) Samp...   Jan 5 2009, 20:07
|- - _Pasha   Цитата(korobov_michael @ Jan 6 2009, 00:0...   Jan 5 2009, 20:22
||- - korobov_michael   Цитата(_Pasha @ Jan 5 2009, 22:22) You si...   Jan 5 2009, 21:32
|- - Andrejka   Цитата(korobov_michael @ Jan 6 2009, 00:0...   Jan 6 2009, 05:52
||- - korobov_michael   Цитата(Andrejka @ Jan 6 2009, 07:52) Yes,...   Jan 6 2009, 07:39
|- - Andrejka   Цитата(korobov_michael @ Jan 6 2009, 00:0...   Jan 6 2009, 21:43
- - radu   hello i'm beginner and i have the same problem...   Jan 16 2009, 10:39
- - radu   hello again i solve the problem regarding correct ...   Jan 16 2009, 19:16
|- - korobov_michael   Цитата(radu @ Jan 16 2009, 21:16) hello a...   Jan 17 2009, 06:57


Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 21st July 2025 - 06:08
Рейтинг@Mail.ru


Страница сгенерированна за 0.0134 секунд с 7
ELECTRONIX ©2004-2016