[SOLVED] C code into Bascom- mcu 8051

Status
Not open for further replies.

Ma3ix

Member level 2
Joined
Dec 17, 2015
Messages
43
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
375
is there any good soul who can translate me this part of code writed in C into Bascom?
:?:

#include <reg52.h>
#include <stdio.h>
#include <intrins.h>

void delay_ms(unsigned int time)
{
unsigned int i,j;
for(i=0;i<time;i++)
for(j=0;j<1275;j++);
}
void delay_us(void)
{
_nop_ (); // generates delay of one machine cycle

}
void uart_init(void)
{
SCON = 0x52; // setup serial port control
TMOD = 0x20; // hardware (9600 BAUD @11.05592MHZ)
TH1 = 0xFD; // TH1
TR1 = 1; // Timer 1 on
}
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…