Do you have a question? Post it now! No Registration Necessary
November 9, 2005, 9:52 pm

http://www.dunfield.com/downloads.htm it does not look like there is a C
compiler found here at all
http://chaokhun.kmitl.ac.th/~kswichit/2051/basic/basic.htm
how to program that 2051 so that I have the same of result
http://arm.web7days.com/tn/serial.jpg.html
when I apply the realterm.
and suppose to store "hello world" in a register or P.X , I need help
1. idenify itself "I am here" like hello world in
http://arm.web7days.com/tn/serial.jpg.html
*
* helloworld.c
* First C program for 2051 experiment
* * Copyright (C) 2005
* compiled with Dunfield Micro-C for 8051 Release 3.2
*/
#include c:\mc51io.h /* include i/o header file */
#include c:\mc51reg.h
printf, sprintf, concat
int main()
{
unsigned char temp;
BAUD = 0x30; // 9600b
SCCR1 = 0x00; // 8-bit mode
SCCR2 = 0x0C; // enable Tx/Rx, no interrupts
printf("Hello, world!\n");
temp = 0;
while(1)
{
if(temp%2)
PORTA = PORTA | 0x10; // turn on Port A, pin 4
else
PORTA = PORTA & ~(0x10); // turn off Port A, pin 4
temp++;
}
return 0;
}
no sure if this will work since I have not compile micro-c compiler
TIA
Site Timeline
- » atmega16 adc question
- — Next thread in » Microcontroller Discussions
-
- » what is the best C compiler for 2051 microcontroller??
- — Previous thread in » Microcontroller Discussions
-
- » New(ish) assembler for PIC16 microcontrollers (asm1825)
- — Newest thread in » Microcontroller Discussions
-
- » Возможности тестера DT-830B
- — The site's Newest Thread. Posted in » Electronic Circuits (Russian)
-