Помощь - Поиск - Пользователи - Календарь
Полная версия этой страницы: Mega64 и код на разных языках
Форум разработчиков электроники ELECTRONIX.ru > Микроконтроллеры (MCs) > AVR
ipkin
одно и тоже устройство не хочет работать с кодом на разных языках
на асме работает на Си не хочет
состав устройства мега64 видеопроц V9990 датафлэш45db161
причём с кодом на си я вижу выход данных с датафлэш с помошью осцилографа а картинку не получаю
на асме всё ок
по фьюзам
SUT0=0 BOOTSZ0=0 BOOTSZ1=0
если M103C=0 на Си не вижу выхода данных с датафлэш при 1 они есть
если M103C=1 то код на асме не работает
растолкуйте что не так
пожалуйста
defunct
Для начала берите ДШ, и почитайте про фуз M103C.

В двух словах M103C делает из Mega64 совсем другой чип - Mega103, когда запрограммирован ==0.
ipkin
Цитата(defunct @ May 12 2008, 20:05) *
Для начала берите ДШ, и почитайте про фуз M103C.

В двух словах M103C делает из Mega64 совсем другой чип - Mega103, когда запрограммирован ==0.

хм в том то и дело что при M103C==0 асмовский код работает отлично а стоит отключить этот фуз M103C==1 (режим совместимости с мега 103) всё код не работает
помогите уже голова пухнет
пожалуйста
Палыч
Цитата(ipkin @ May 12 2008, 22:33) *
хм в том то и дело что при M103C==0 асмовский код работает отлично а стоит отключить этот фуз M103C==1 (режим совместимости с мега 103) всё код не работает
Ну, прочитайте же чем отличается m64 от m103. У Вас программа, наверное, написана так, что эти отличия влияют на её (программы) работу. Имхо, в качестве ОЗУ (под хранение переменных) используется область, которая в m64 отведена под ввод-вывод.
ipkin
Цитата(Палыч @ May 13 2008, 08:04) *
Ну, прочитайте же чем отличается m64 от m103. У Вас программа, наверное, написана так, что эти отличия влияют на её (программы) работу. Имхо, в качестве ОЗУ (под хранение переменных) используется область, которая в m64 отведена под ввод-вывод.

у меня видео проц подключен по схеме внешней памяти но без регистра защёлки
данные видеопроца (D0-D7) сидят на (AD0-AD7)Mega64
(A0-A2)видеопроца сидят на (A8-A10) Mega64 ну и RD WR соответственно
Палыч
Прочитайте хотя бы это
Цитата


The ATmega64 is a highly complex microcontroller where the number of I/O locations

supersedes the 64 I/O location reserved in the AVR instruction set. To ensure backward

compatibility with the ATmega103, all I/O locations present in ATmega103 have the

same location in ATmega64. Most additional I/O locations are added in an Extended I/O

space starting from 0x60 to 0xFF (i.e., in the ATmega103 internal RAM space). These

location can be reached by using LD/LDS/LDD and ST/STS/STD instructions only, not

by using IN and OUT instructions. The relocation of the internal RAM space may still be

a problem for ATmega103 users. Also, the increased number of Interrupt Vectors might

be a problem if the code uses absolute addresses. To solve these problems, an

ATmega103 compatibility mode can be selected by programming the fuse M103C. In

this mode, none of the functions in the Extended I/O space are in use, so the internal

RAM is located as in ATmega103. Also, the extended Interrupt Vectors are removed.

The ATmega64 is 100% pin compatible with ATmega103, and can replace the

ATmega103 on current printed circuit boards. The application note “Replacing

ATmega103 by ATmega64” describes what the user should be aware of replacing the

ATmega103 by an ATmega64.

By programming the M103C Fuse, the ATmega64 will be compatible with the

ATmega103 regards to RAM, I/O pins and Interrupt Vectors as described above. However,

some new features in ATmega64 are not available in this compatibility mode,

these features are listed below:

• One USART instead of two, asynchronous mode only. Only the eight least

significant bits of the Baud Rate Register is available.

• One 16 bits Timer/Counter with two compare registers instead of two 16 bits

Timer/Counters with three compare registers.

• Two-wire serial interface is not supported.

• Port G serves alternate functions only (not a general I/O port).

• Port F serves as digital input only in addition to analog input to the ADC.

• Boot Loader capabilities is not supported.

• It is not possible to adjust the frequency of the internal calibrated RC Oscillator.

• The External Memory Interface can not release any Address pins for general I/O,

neither configure different wait states to different External Memory Address

sections.

• Only EXTRF and PORF exist in the MCUCSR Register.

• No timed sequence is required for Watchdog Timeout change.

• Only low-level external interrupts can be used on four of the eight External Interrupt

sources.

• Port C is output only.

• USART has no FIFO buffer, so Data OverRun comes earlier.

• The user must have set unused I/O bits to 0 in ATmega103 programs.

[left]
и загляните в свою программу

Для просмотра полной версии этой страницы, пожалуйста, пройдите по ссылке.
Invision Power Board © 2001-2025 Invision Power Services, Inc.