#70368

Hi there,

I am a student doing my B-Tech Mechanical project where I a design a solar tracker system for a parabolic dish, but have not that much knowledge on arduino uno coding, has anyone here ever done project need help please, using 2 stepper motor, one controlled by four LDR, and the other one by a timer.

need help please

#49517

Hai ,
i am padmanaban , i have seen lots of interesting projects on the web and giving solutions to the problems also. great and excelent.
can you help me to my circuit problem, here i have attached the diagram , the problem is serial communication ,
i am using atmega 16, AVR Studio, through usbapp programmer , avrdude.exe, this is the code: when i connect to the computer hyperterminal to see serial communication from microcontroller to PC terminal i am getting 95 , 47 instead 65 for A 66 for B on the terminal, BUT for U ie 85 in Decimal;, 0x55in Hex, it is showing correctly on hypertermial as 85 – ie U,

I tried with 8 Mhz, 4 Mhz ,16Mhz, 14.7456 Mhz external crystals,
Can you please Help me where I am doing Wrong,

Thanks ,
below is my Avr code and circuit diagram,

#include
#include
#include
#include

void send_char (char ch);
void mes2usart1 (char *ptr);

int main (void)
{
// initialize serial port
sei();
UCSRB = 0x98;
UCSRC = 0x06;
UBRRL = 103; // 9600 16mhz
UBRRH = 0;
//UBRRL = 95; //9600 14.7456 // 9600 BAU //UBRRL = 51; // 9600 8mhz //UBRRL = 103; // 4800 8mhz
//UBRRL = 51; // 9600 4mhz //UBRRL = 103; // 4800 4mhz

while (1)
{
mes2usart1 ("AB");
// UDR=0x55;
_delay_ms(3000);
}
}

void mes2usart1 (char *ptr)
{
while (*ptr)
send_char (*ptr++);
}

ISR (USART_RXC_vect)
{
unsigned char tmp;
tmp = UDR; // get data received through serial port
UDR = tmp; // send back data to serial port
mes2usart1 ( tmp);
}

void send_char (char ch)
{
UDR = ch;
while (!(UCSRA & 0x40));
UCSRA |= 0x40;
}

#49540

Hi padmanaban,

Unfortunately,I have no experience with AVR studio, I can't comment on your issue.

Best regards.

Author
#49533

Mr. GR, will look into the issue and will try to solve it for you soon

#42917

Hi there would it be possible to get your contact details or pls drop me an email, I have an invention i need to discuss with you – ccjrokafor15@gmail.com

Author
#42926

Hi, You can send it to admin (@) http://www.homemade-circuits.com

but the discussions could become a part of this website if it is interesting.

Need Help? Please Leave a Comment! We value your input—Kindly keep it relevant to the above topic!

Your email address will not be published. Required fields are marked *