Microcontroller › 8051 › 8051 based problem
- This topic has 23 replies, 8 voices, and was last updated 10 years, 10 months ago by balaji.
-
AuthorPosts
-
December 13, 2013 at 12:15 pm #4839balajiParticipant
hi freiends
please help me for these bug ,i using 8051 serial communication using printf function and chaeck simulation in proteues they give output differents i check other controllers output should be came
December 14, 2013 at 11:55 am #10734doraemonParticipantMake sure baud rate set by program in 8051 and in virtual terminal of proteus is same. To change baud rate,parity etc right click on virtual terminal and set it(baud rate same in virtual terminal and that of 8051 program). Hope this may fix problem.
December 18, 2013 at 8:40 am #10745balajiParticipanthi friend
I put same baud rate only but output didn’t came if use for another controller for check the tx data is correct ,i got the correct data transmission result i just doubt compiler should wrong if u have proteus simulation please check it down
December 24, 2013 at 8:43 pm #10754Mayukh SarkarParticipantplease provide the code.. I think there is some problem in your printf function or your proteus dll file to virtually create serial terminal, and yes it can be baud rate prob. so please provide the code
December 25, 2013 at 6:26 am #10757balajiParticipant#include<reg51.h>sbit sw=P1^0;//unsigned char *call_cmd =”ATD9843927672;”;unsigned char b[]={‘A’,’T’,’D’,’8′,’8′,’4′,’3′,’9′,’2′,’7′,’6′,’7′,’2′,};unsigned char i;void delay(unsigned char z){unsigned int i,j;for(i=0;i<z;i++)for(j=0;j<1275;j++);}void trans(unsigned val){SBUF=val;while(TI==0);TI=0;}void main(){P1=0xff;SCON=0X52;TMOD=0X20;TH1=0XFD;TR1=1;TI=1;sw=0;while(1){if(sw==0){for(i=0;i<14;i++){trans(b);delay(50);}}}}December 25, 2013 at 2:15 pm #10759Mayukh SarkarParticipantI don’t see any printf function. Anyway gimme some time & I will get it done
December 26, 2013 at 4:28 am #10760balajiParticipanthi friend
thanks for your response
December 26, 2013 at 10:54 am #10761shiva vadlaParticipantHello Balaji……
pls set proties controller baud rate as 11.0592Mhz….
double click on controller and set baud rate…….
i am expectng this may cause problem.December 26, 2013 at 11:07 am #10762balajiParticipanthello
we should set the baudrate in virtual terminal only , how set baudrate in controller side
December 28, 2013 at 11:27 am #10764VIJAYAKUMARParticipanthi balaji
i think so u have to convet the data before sending to serial port
December 28, 2013 at 12:35 pm #10765sandeepParticipantfirstly connect the button to vcc from 5v, and while comparing the loop go for while not if, and check the debounce condition also.
December 28, 2013 at 12:53 pm #10766balajiParticipanthi friends
thanks for your response
jeyakumar told convert the data before sending it means i dont know clearly wts conversion here
i just put a data in SBUF so its FRAMING and sending the data ,if u means use max232 there is no need in proteus simulation
and one friend i didnt see the name
he told the button connecting problem i check and tell me later friend
December 28, 2013 at 1:12 pm #10767hirenParticipanthow to blow 12v lamp from 8051 microcontroller for 1min time.
December 28, 2013 at 1:19 pm #10768balajiParticipantHELLO HIREN
if 12 volt bulb first but relay for this
and create software for this ,create time delay function for exact 50 ms and use for loop and repat running the delay to 10 times it should give 1sec and u further repat the delay for 60 times u will get a 1 min
December 29, 2013 at 1:03 pm #10782kishoreParticipanthi Balaji,
while creating HEX file what was the clock frequency and what is the clock frequency you set in µc. As default in proteus it is 12Mhz. while creating HEX file set xtal as 11.0592Mhz and the µc you used in proteus, double click to see the properties and set clock frequency as 11.0592 Mhz.
and set virtual terminal as Echo typed character.
-
AuthorPosts
- You must be logged in to reply to this topic.