Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
hello betwixt, i will try to workout the receiving part in b port.
andre_teprom, i actually dint copied the value from terminal..i just wrote the data what i saw on the terminal. i have uploaded the screen shot for reference on the last post.
Hello Mr. Zuisti,
i used 20Mhz crystal, Pre scalar 1:4, period register value 130, Post scalar value 1:1 and that gives an interrupt on every 104uS right??
now the code transmits fine using timer 2 interrupt but it outputs junk data when i receive and re-transmit the same byte.
I'm receiving...
hello Mr.Brian,
i dint understand how you got the value 103.8uS using your settings.
For 20Mhz crystal the clock value to timer will be 5Mhz(20/4 = 5) so timer 2 will increment on every 5uS. starting value of timer 2 is 173 , so count before interrupt is 83, i.e 256-173 = 83. so timer 2 will...
Mr. Klaus, jus now i had verified the timing using the graph ...its 115uS/bit.
But actually the problem is in the line set_timer2(0) in the ISR.
i removed that line and the code now works fine.
right now transmitting using interrupt working fine, but when i try to include the receiving code...
Dear all,
I have managed to run the software uart without using interrupt successfully.
Now i'm trying to write the same using timer 2 interrupt on 16F877a controller.
but the code outputs junk result on proteus. can anybody help to solve the problem? below is the code
#include "16f877a.h"...
I agree Mr.klaus , it depends on point of view. i try to avoid interrupts most of the time, but it is very useful in saving processor power as you say. actually i'm not familiar with interrupts that's the actual reason. i will try to do the same by using interrupts on the later versions of this...
Hi Zuisti, big thanks to you, after editing of the clock speed from 40Mhz to 4Mhz, the code worked fine. i got the result. thank you very much.
Thanks to betwixt and klausst also.
Thanks betwixt and KlausST for the reply.
betwixt, if i try to define the bit rate using delay_cycles(), the minimum delay i can get will be 5uS in case of 20Mhz crystal.
Thats why i used the delay_us() function it will give me as minimum as 1uS delay. regarding the function based transmission...
Dear All,
I'm trying to create a software UART for my 16f877a controller for interfacing serial bluetooth and gsm modem for a home automation purpose.
But i got stuck in the first step itself. First i tried FORCE_SW function on the CCS C complier but it is not working properly. i mean, the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.