Brown out reset flag gets set when the VDD drop below the operating voltage. It holds the reset high for some time. Check the datasheet for more information.
Yes. You can accurately calculate by looking at Assembly code and then calculate the instruction cycles from the time interrupt triggers.
Time from Trigger into the ISR can vary only if there are higher priority interrupts are being triggered at the same time. Do you have multiple interrupts?
Thank you for your responses.
it is a Modbus..
I already do it. I use interrupt routine. You are right with extra hardware, it might be possible but I don't have that option.
This is how it goes.
1. Master send data every 400mSec.
2. Slave starts up. Wait for a command from the master. Wait...
Hello Everyone,
Does anyone know an easy way to automatically detect the improper termination on the rs485 communication line?
Automatically means without any human intervention. If the termination is not right, then the module can let user know about it.
The typical communication speed...
Yes it is very useful and it is a very general logic and not specific to the controller. It saves space and execution time as the processor has to deal with a variable.
I do it like this:
#define bit_mask (err1 | err2 | err3 | .....|err8)
define or declare err1, ...err8 as a bit.
Now,
You can...
1. Rs232 or TTL is communication between 2 devices and if you try to connect more things on the bus, you could get weird behavior.
2. Secondly, you can use pull up or pull down depending on what MAX datasheet suggest to keep the signal stable on the power up.
INTCON = 0x09 says RAIE: PORTA Change Interrupt Enable bit
Datasheet clearly mentions about IOCA register. You have to clear IOCA4 register in order to disable RAIE interrupt.
http://ww1.microchip.com/downloads/en/DeviceDoc/41202C.pdf
page 33
This is wrong: while (j=1)
it should be while (j== 1);
while(1) => run forever.
while(j==1); run until J=1;
I guess you are asking; instead of while(1), can you use while(j==1). Ofcourse you can, but then you will have to declare J and you have to make sure its always 0 to make sure the loop...
what is your micro and what framework you are using? I guess MPLAB.
Check your oscillator selection bit and Primary oscillator configuration.
This line look OK:
_FOSC(FCKSM_CSECMD & OSCIOFNC_OFF & POSCMD_XT)
FCKSM = CSDCMD // Clock Switching and Monitor Selection
OSCIOFNC = OFF...
i use xtr111 for my applications to generate a 4-20mA signal. Look into it, its simple to use.
Also check this link, I found it long back: https://www.hackster.io/ArduPic/4-20-ma-current-output-for-arduino-due1-82691a
I developed few products using esp8266. it is very reliable so for. It has one Analog input.
I would connect each sensor to an esp8266 and connect all the esp to another esp which is a webserver. Write a good html page and you can access and control everything from you smart phone. There are...
Its simple timer program. You have to check the specs on the micro to get more understanding and specifically check timer registers.
This program is initializing timer with TMOD register. It is putting the the counts in the timer registers TL0 and TH0.
The program is waiting for a timer expire...
One good thing I love about Linux is most of the software are free/open source. There is no specific tool you have to learn but I would start how to manage your files and folder, basic commands. Debugging a small c code with gdb (gcc) is really cool. eclipse is a good tool to have. Just start...