Forum Replies Created
-
AuthorPosts
-
sourabhParticipant
void pwm();
void main()
{
led=1;
pwm();
led=0;
pwm();
}
void pwm()
{
TMOD=0x01;
TH1=0x67; //set the value of the delay
TL1=0xff;
TR1=1;
while(TF1==0);
TR1=0;
}
sourabhParticipantSir, for implementing pwm you have to use timers. Use them with a bit of logic and you will have your pwm.
sourabhParticipantThis is the content of hex file. Save it in notepad with .hex format before burning it to your controller. Also I use at89s52 controller.
:0F08AE006275737479206B69206D6973747900BA
:100800007508FF750908750AAE12088BE4F50BF53B:100810000CAB08AA09A90A850C82850B831208363D:10082000FF60113395E0FE1208DF050CE50C70E166:06083000050B80DD80FED7:08086300C294D2967F017E00D1:10086B00E4FDFCC3ED9FEC9E5015E4FBFA0BBB00C3:0F087B00010ABA04F8BBFBF50DBD00010C80E4C7:01088A00224B:0A08D500D293120863C29602086B6A:0C08BD008FA0C293120863C29602086B61:10088B007F387E001208BD7F0E7E001208BD7F01EF:10089B007E001208BD7F067E001208BD7F807E00A1:0308AB000208BD83:0508DF008FA00208D506:030000000208C92A:0C08C900787FE4F6D8FD75810C02080071:10083600BB010CE58229F582E5833AF583E0225077:1008460006E92582F8E622BBFE06E92582F8E222C1:0D085600E58229F582E5833AF583E49322DB:00000001FFsourabhParticipantyou can use one timer as a counter or timer at one time but not simultaneously.
sourabhParticipantH12D is decoder while H12E is encoder. When the data is send via RF is in encoded form then it is decoded by decoder at receiver’s end.
sourabhParticipantTry using it in the negative logic.
sourabhParticipantIt depends upon how you want to use the switch and your programming logic.
If you are using “if ” condition uc rill check the state of the switch only once. But in case of while it will execute the instruction till the condition in while is true.
sourabhParticipantMay be you have short circuited the input supply. Or you are drawing or giving more current to the uc. Like trying to run a motor without a driver results in heat dissipation. Or may be you have not conneccted your circuit properly.
sourabhParticipantNitin if your circuit and code are proper then you try to change the contrast of your lcd or look at the screen at different angle, Sometimes it happens that due to contrast problem the characters are n;t visible. Or you try out with a different lcd, also check that is it properly soldered or not.
sourabhParticipantsachin the “my.h” file may be the user defined file of the user that’s why it is showing error in your system. He may have saved that module and is using it again for delay purposes.
sourabhParticipanttry this#include<reg52.h>sbit rs = P1^3;sbit rw = P1^4;sbit en = P1^6;int i;void delay(unsigned int);void data1();void cmd(int);void lcdin();void lcd(int);void main(){char *a;a=””; //write your string herelcdin();for(i=0;a!=’