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

 
 
2 страниц V  < 1 2  
Reply to this topicStart new topic
> Dewpointer
radu
сообщение Jan 16 2009, 10:39
Сообщение #16





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



hello
i'm beginner and i have the same problem as Andrejka
i try atmega16, 32 and 162 and the resultat was the same
at start the LCD show only "SHT11 MONITOR" on first line
when i disconnect the 10 k pull-up resistor from DATA line of SHT11 sensor it didn't show time and date and the other parameters aren't correct, only heat position swich is correct
i mentioned i'm using CodevisionAvr to compile and i tryed the sugestion metioned in previously posts
i attach the pictures
any sugestion to make it work will be helpfull
best regards

Сообщение отредактировал radu - Jan 16 2009, 10:42
Эскизы прикрепленных изображений
Прикрепленное изображение
Прикрепленное изображение
 
Go to the top of the page
 
+Quote Post
radu
сообщение Jan 16 2009, 19:16
Сообщение #17





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



hello again
i solve the problem regarding correct parameters
the solution was putting timer 2 to clock system
but remains one problem
how to display data and time
best regards

Сообщение отредактировал radu - Jan 16 2009, 19:18
Эскизы прикрепленных изображений
Прикрепленное изображение
Прикрепленное изображение
 
Go to the top of the page
 
+Quote Post
korobov_michael
сообщение Jan 17 2009, 06:57
Сообщение #18


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

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



Цитата(radu @ Jan 16 2009, 21:16) *
hello again...

First of all, don't use library functions in ISR - they take many cycles to complete. Try to replace the block

Код
sprintf(lcd_buffer,"%02d:%02d:%02d  %02d/%02d/%04d",t.hour, t.minute, t.second, t.date, t.month, t.year);
lcd_gotoxy(0,3);
lcd_puts(lcd_buffer);



by block, for exampe


Код
uint8_t i = 0;

lcd_buffer[i++] = 'H';

lcd_buffer[i++] = 'e';

lcd_buffer[i++] = 'l';

lcd_buffer[i++] = 'l';

lcd_buffer[i++] = 'o';

lcd_gotoxy(0,3);
lcd_puts(lcd_buffer);

and check if you will see the 4-th string.
The second. Sorry for  bb-offtopic.gif . Don't place your projects in the C disk smile.gif It's not a good practice
Go to the top of the page
 
+Quote Post
B0SC0
сообщение Jan 22 2009, 20:17
Сообщение #19





Группа: Новичок
Сообщений: 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
Сообщение #20


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

Группа: Свой
Сообщений: 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
Сообщение #21





Группа: Новичок
Сообщений: 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
Сообщение #22


Участник
*

Группа: Участник
Сообщений: 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
Сообщение #23





Группа: Новичок
Сообщений: 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
Сообщение #24


Участник
*

Группа: Участник
Сообщений: 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

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

 


RSS Текстовая версия Сейчас: 18th July 2025 - 02:26
Рейтинг@Mail.ru


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