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

 
 
> mega128+VMLAB+TTY
Rattlesnake
сообщение Apr 19 2007, 12:49
Сообщение #1





Группа: Новичок
Сообщений: 2
Регистрация: 19-04-07
Пользователь №: 27 169



ПЛЗ, ткните что я не так делаю.. Начинаю разбираться с МП, а тут затык..
Хочу вывести на TTY "Hello, world", но ни чего не получается..
prnt.c:
#include <mega128.h>
#include <stdio.h>
void main(void)
{
// USART0 initialization
// Communication Parameters: 8 Data, 1 Stop, No Parity
// USART0 Receiver: Off
// USART0 Transmitter: On
// USART0 Mode: Asynchronous
// USART0 Baud rate: 38400
UCSR0B=0x00;
UCSR0A=0x00;
UCSR0C=0x86;
UBRR0H=0x00;
UBRR0L=0x0C;
UCSR0B=0x08;
//#asm("sei")

while (1)
{
printf("hello");
};
}

VMLAB:
prnt_vm.prj:
.MICRO "ATmega128"
.TARGET "prnt.hex"
.TOOLCHAIN "GENERIC"
.COFF "prnt.cof" ; " "
.SOURCE "prnt__.c"

.TRACE ; Activate micro trace

; Following lines are optional; if not included
; exactly these values are taken by default
; ------------------------------------------------------------
.POWER VDD=5 VSS=0 ; Power nodes
.CLOCK 1meg ; Micro clock
.STORE 250m ; Trace (micro+signals) storage time


X1 TTY(38400 8) PD0 PD1


Где я что неправильно делаю?
Go to the top of the page
 
+Quote Post



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

 


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


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