how to program that 2051 so that I have the same of result
and suppose to store "hello world" in a register or P.X , I need help
- idenify itself "I am here" like hello world in formatting link
- * helloworld.c * First C program for 2051 experiment * * Copyright (C) 2005
- compiled with Dunfield Micro-C for 8051 Release 3.2 */
#include c:\mc\8051io.h /* include i/o header file */ #include c:\mc\8051reg.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