Hi E,hi C,
Please, Data Type and Format, of #rot. ?
Also, what is the measurement parameter?
E
Hi E,hi,
OK, I am trying to help you, but it's difficult if I don't know what you are asking.
As examples: consider #rot, you say its value is from 0V thru 3.3V.
This could be, depending upon the unit that's sending the Data
in
as ASCII characters "0.0" thru "3.3" [including the DP]
or in HEX as 00 thru 21 [represented as 0x00 thru 0x21
or BINARY Bits 00000 thru 10001
or DECIMAL 00 thru 33
If you wanted to Display the Value say, on an Alpha Numeric LCD, ASCII Format is OK.
If you wanted to use the Value in a numeric calculation, Decimal format is OK
Say the Value was in HEX or Binary and you need to display and say also use the value in a calculation, you would have to Convert the HEX value to ASCII for the LCD and Decimal for the calculations,
Oshonsoft does have Commands to do these conversions.
E
Post an ACTUAL message string and I will try to interpret the formatting.
Hi S,You should really clean up the code. You have functions like recv_rx and send_tx that are not called anywhere in the program. You initialize EUSART with baudcon, spbrg, etc which is pointless as HSEROPEN does that for you later.
You initialize MSG1="" before you declare that variable as a string. MSG1 is not used anywhere either, as Proc send_string is never called.
Hi S,You should really clean up the code. You have functions like recv_rx and send_tx that are not called anywhere in the program. You initialize EUSART with baudcon, spbrg, etc which is pointless as HSEROPEN does that for you later.
You initialize MSG1="" before you declare that variable as a string. MSG1 is not used anywhere either, as Proc send_string is never called.
Of course interrupts have stopped, as you clear INTCON at the beginning and never enable interrupts after that...Hi S,
I've cleaned up the CODE as best as I can and posted it here:
The SPBRG, has been commented out, but it neeeds investigation, later.
Since cleaning up, the GPS interrupt has stopped, but the QEI is fine, and sending it's DATA to PIC #1 MASTER via SPI, as expected.
C.
Hi S,Of course interrupts have stopped, as you clear INTCON at the beginning and never enable interrupts after that...
"Interrupt Service" cannot run until there is an actual interrupt and it is enabled by setting proper registers. Otherwise the processor ignores interrupts...Hi S,
Is there nothing in the 'INTERRUPT SERVICE' line 243, that enables the interrupt?
C
Hi E,hi C,
How can the program read the contents of the ISR if it has not been given access Enable to the ISR .?
E
BTW: the ISR is Code 'bloated', you will have problems.
Hi S,"Interrupt Service" cannot run until there is an actual interrupt and it is enabled by setting proper registers. Otherwise the processor ignores interrupts...