So, can I write it as:
HSERIN2 [STR MESS1[0]\255, STR MESS1[256]\255]
Secondly, what will happen when it receives a $00 byte? and how do I convert this received data (512 bytes) back to hex...
Type: Posts; User: Megahertz; Keyword(s):
So, can I write it as:
HSERIN2 [STR MESS1[0]\255, STR MESS1[256]\255]
Secondly, what will happen when it receives a $00 byte? and how do I convert this received data (512 bytes) back to hex...
Thanks for the detail. What does this (bold highlighted) code do?
for i = 0 to 11
HSERIN2 1000,SYNC,[COM(i)] 'Rx ACK & SYNC pattern (2 x 6 bytes)
next i
This looks like a solution as to get 512 bytes I can just do 'for i=0 to 511'.
Thanks for...
It is irrelevant now as I need to find a way to get it in hex until there is a way to convert it back.
I can create byte[90] and do it that way.
ok. I tried to get 512 bytes using string (STR command) and the following statements
MESS1 VAR BYTE[512]
HSERIN2 [STR MESS1\512]
The data seems to be getting corrupted as I believe some...
Not quiet sure about this. Doesn't seem to be valid.
I have instead declared 12 different variables and trying to get the response in them...i.e. - HSERIN 500,SYNC,[COM,ID,P1,P2,P3.....]
But it...
Ok, lets start solving the puzzle.
1) The camera is RS232 type
2) USART was floating. I tied it high and no reply back now - this problem is solved (cheers for that)
secondly can you suggest...
My baud settings are as follows:
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 20h ' Enable transmit, BRGH = 0
DEFINE HSER_CLROERR 1 ' Clear overflow...
I tried running two USARTs on an 18f45k22. The first one runs fine (PortC.6) but the second one (D.6) outputs junk.
DEFINE HSER_TXSTA 20h ' Enable transmit, BRGH = 0
DEFINE HSER_CLROERR 1 ' Clear...
Thanks a lot. I now will start with the prop control and add integral and then post the code to discuss any issues.
Ok, I am actually starting to understand it better now, thanks to all.
I would like to ask, if I use pot to set this gain, the maximum decimal value I will get is 1024 i.e. $0400 (1024/256) which...
Thanks Henrik. So, is there any way I can tell what is the actual gain setting ( like 2.14 or 3.5 etc) before I multiply with 10 or 100. For example just by looking at lets say for example $0324?
...
Thanks Henrik. I have got one more question for you, for now:
pid_Kp = $0700 'Set Kp to 7.0
pid_Ki = $0080 'Set Ki to 0.5
pid_Kd = $0225 ...
I have to make a PID temperature control. I do not want to use any existing inc files though they have helped a lot in understanding. I am starting from basics and would like some help in...
Thanks. Another problem resolved :)
Hi, I have 5 sensors attached to a PIC. I need to get one variable, word size (I suppose) and load the number(s) of the triggered sensor in this variable.
I have 5 bit size variables which are set...
Thanks for the info. The On DEBUG seems very useful but will it work if I am DEBUGIN for 5 seconds in the main loop. I am trying to make a security system SMS based in which the 877A keeps checking...
I have one 877A and I would like to monitor 16 inputs (or more if possible) which I cannot do it by continues monitoring the inputs to go low/high as PIC has to do some other stuff in the main...
I have aa AC motor which gets its current through a relay with a capacitor in series between the relay and the motor.
The motor is appx 150Watts and I think because of the capacitor the relay gets...
I have one capacitor type circuit with bridge and zener to bring down the voltage from 200VAC to 12V DC. I then connect the PIR module after a 7805 which provides trigger to my PIC based on any human...
Thanks Darrel. It works.
Hello Darrel, if I do not have to save it, what variables I will use to restore it or how it is restored. Currently I have the following restoration code-
EndInt ; restore the machine state...
Does anyone know what this error means?
I am not using any indirect addressing in the code.
6831
Hi, I am trying to write an ISR in assembly, but when simulating, I am having some errors in proteus. Can someone please have a look into this context saving part of my code and advise me if it is...
Thanks Henrik. This explains a lot. I do not have an any device currently with me so I could not measure it at the moment.
Few things come to mind - What is the actual acceptable delay/error @ 2400...