hello world in 2051

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

http://www.dunfield.com/downloads.htm it does not look like there is a C
compiler found here at all


how to program that 2051 so that I have the same of result

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

 * 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;
PORTA = PORTA | 0x10; // turn on Port A, pin 4
PORTA = PORTA & ~(0x10); // turn off Port A, pin 4
return 0;

no sure if this will work  since I have not compile micro-c compiler


Site Timeline