• AVR Freaks

Hot!I2C Interfacing XC8 PIC16F877A

Page: < 12345.. > >> Showing page 2 of 6
Author
ric
Super Member
  • Total Posts : 24593
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: offline
Re: I2C Interfacing XC8 PIC16F877A 2019/07/04 15:39:13 (permalink)
+1 (1)
delfindelfin
There are also negative numbers in the Calibration Constants .. I am unable to find that information in the datasheet .. But, do I have to assume that negative numbers are in Signed Magnitude, One's Complement or Two's Complement Represantation?

You don't have to care. Just make sure they are stored in "signed" variables, not "unsigned" variables (which can only hold positive numbers, and zero)
 

I think that is important since I don't understand what is it the real difference between int8_t and uint8_t when it comes to save bits on a register 

"int8_t" is a signed 8 bit variable.
"uint8_t" is an unsigned 8 bit variable.
You don't need to know HOW it stores negative numbers so long as you don't try to stuff a negative number into an unsigned variable.
If you are really interested, the XC8 User Guide will tell you.
 

 Datasheet:
https://cdn-shop.adafruit...ST-BMP180-DS000-09.pdf
 
The datasheet doesn't say neither the range of the temperature .. unless is the range of the 16 bit value ..

Your link has been corrupted. The full link is: https://cdn-shop.adafruit...ST-BMP180-DS000-09.pdf
Page 6 says the chip can operate with "full accuracy" from 0 to 65 deg C.
 
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#21
pcbbc
Super Member
  • Total Posts : 1381
  • Reward points : 0
  • Joined: 2014/03/27 07:04:41
  • Location: 0
  • Status: offline
Re: I2C Interfacing XC8 PIC16F877A 2019/07/04 16:02:57 (permalink)
+1 (1)
The C standard doesn’t say anything about number representation. But on PICs (and I expect all other CPUs your ever likely to work on) signed values are stored as two’s compliment.

Your link is broken. Here is a working link.

You are right that the datasheet doesn’t say what the number representation is. It does say MSB first though (on page 15) and tells you values are either 16 bit signed or unsigned. I would be assuming two’s compliment.

Of course you could always look at the reference code.
For all calculations presented here an ANSI C code is available from Bosch Sensortec (“BMP180 _API”).


int8_t is signed 8 bit value in (two’s compliment)
and uint8_t is an unsigned 8 bit value
What don’t you understand about them?
#22
ric
Super Member
  • Total Posts : 24593
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: offline
Re: I2C Interfacing XC8 PIC16F877A 2019/07/04 16:10:27 (permalink)
+1 (1)
pcbbc
The C standard doesn’t say anything about number representation. But on PICs (and I expect all other CPUs your ever likely to work on) signed values are stored as two’s compliment.
...

Agreed.
I think the OP's concern is that the constants read out from the sensor (all 16 bit, some signed) might be stored in a different representation to the PIC.
Almost certainly the sensor is also storing the data in two's complement form as well. As this is the format used by just about every chip/compiler users are likely to be using, they don't bother spelling it out.
(They really should, which probably indicates that the datasheet author never considered there are other ways to store negative numbers.)
 
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#23
pcbbc
Super Member
  • Total Posts : 1381
  • Reward points : 0
  • Joined: 2014/03/27 07:04:41
  • Location: 0
  • Status: offline
Re: I2C Interfacing XC8 PIC16F877A 2019/07/04 16:14:56 (permalink)
+1 (1)
ric
delfindelfinThere are also negative numbers in the Calibration Constants .. I am unable to find that information in the datasheet .. But, do I have to assume that negative numbers are in Signed Magnitude, One's Complement or Two's Complement Represantation?
You don't have to care. Just make sure they are stored in "signed" variables, not "unsigned" variables (which can only hold positive numbers, and zero)

You need to care if you are reading them and then using them in your calculations.

Because if they are in one’s compliment and you read them as two bytes and just stuff them into a int16_t high and low bytes in XC8 you will get the wrong value for negative values, since XC8 uses two’s compliment representation.

But my guess/assumption is device uses two’s compliment. That’s based on the fact that it’s the most common representation and the datasheet doesn’t say otherwise.

Edit: ric, I see you’ve replied already. I think we’re on the same page about this.
post edited by pcbbc - 2019/07/04 16:18:11
#24
1and0
Access is Denied
  • Total Posts : 9989
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: I2C Interfacing XC8 PIC16F877A 2019/07/04 16:48:14 (permalink)
+2 (2)
Here is a thread regarding the BMP180 and its math: https://www.microchip.com/forums/m978642.aspx
 
#25
delfindelfin
Super Member
  • Total Posts : 387
  • Reward points : 0
  • Joined: 2017/01/19 12:32:58
  • Location: Mexico
  • Status: offline
Re: I2C Interfacing XC8 PIC16F877A 2019/07/04 18:24:10 (permalink)
0
Well, this is my code .. But it is wrong since what I get is 40.9 C .. When I should get 20.0 C
 

 
// Including C Standard Libraries
#include <stdint.h>
// Including XC8 Compiler Library
#include <xc.h>
// Including User's Libraries
#include "i2c.h"
 
// Defining Oscillator Frequency
#define _XTAL_FREQ 8000000
 
 
 
// Defining Registers Names
#define module_address_write 0xEE // Module Address Register (Write Mode)
#define module_address_read 0xEF // Module Address Register (Read Mode)
 
#define DATA_XLSB 0xF8 // Data Register XLSB
#define DATA_LSB 0xF7 // Data Register LSB
#define DATA_MSB 0xF6 // Data Register MSB
 
#define ctrl_meas 0xF4 // ctrl Register ( Measurment Control <4:0>, Sco <5>, Oss <7:6> )


 

#define calib_AC5_MSB 0xB2 // Calibration Register AC5 MSB
#define calib_AC5_LSB 0xB3 // Calibration Register AC5 LSB
#define calib_AC6_MSB 0xB4 // Calibration Register AC6 MSB
#define calib_AC6_LSB 0xB5 // Calibration Register AC6 LSB

#define calib_MC_MSB 0xBC // Calibration Register MC MSB
#define calib_MC_LSB 0xBD // Calibration Register MC LSB
#define calib_MD_MSB 0xBE // Calibration Register MD MSB
#define calib_MD_LSB 0xBF // Calibration Register MD LSB
 
// Binary to BCD to ASCII Converter /////////////////////////////////////////////////////////////////
void Binary_BCD_ASCIIConverter(char *Sen_Decim, char *Sen_Ones, char *Sen_Tens, uint16_t binary )
{

uint8_t Hundreds = 0;
uint8_t Tens = 0;
uint8_t Ones = 0;

uint8_t i;

for(i=0; i<16; i++) { // Dabble Double Algorithm to Convert Binary into BCD
Ones <<= 1;
Tens <<= 1;
Hundreds <<= 1;

if (binary & 0x8000) { // xxxx xxxx xxxx xxxx & 1000 0000 0000 0000 = x000 0000 0000 0000
Ones++;
}
if (Ones >= 10) {
Ones -= 10;
Tens++;
}
if (Tens >= 10) {
Tens -= 10;
Hundreds++;
}
if (Hundreds >= 10) {
Hundreds -= 10;
}
binary <<= 1;
}

*Sen_Decim = Ones; // Assigning BCD Values to Sensor Reading Values
*Sen_Ones = Tens;
*Sen_Tens = Hundreds;

*Sen_Decim += '0'; // convert to ASCII
*Sen_Ones += '0';
*Sen_Tens += '0';
 
}
 

void bmp180_compute_temp(char *Temp_Decim, char *Temp_Ones, char *Temp_Tens) {

// Reading Calibrating Factors /////////////////////////////////////////////////////////////

// Calibrating Factors (Registers used: AC5H, AC5L, AC6H, AC6L, MCH, MCL, MDH, MDL)
int8_t AC5H, AC5L, AC6H, AC6L ;
uint16_t AC5, AC6;
int8_t MCH, MCL, MDH, MDL;
int16_t MC, MD;
 
// I2C Initiation //////////////////////////////////////////////////////////////////
I2C_Master_Init(High_Speed_Mode); // I2C Master with clock in Standard Mode (100 kbps)

// BMP180 Calibration Data Reading

// Reading AC5
I2C_Master_Begin(); // Start condition
I2C_Master_Write(module_address_write); // 7 bit address + Write
I2C_Master_End();

I2C_Master_Begin(); // Start condition
I2C_Master_Write(calib_AC5_MSB); // Register Address
I2C_Master_End();

I2C_Master_Begin(); // Start condition
I2C_Master_Write(module_address_read); // 7 bit address + Read
AC5H = I2C_Master_Read(0); // Read + Acknowledge
AC5L = I2C_Master_Read(0); // Read + Acknowledge
I2C_Master_End();

AC5 = (AC5H << 8) + AC5L;

// Reading AC6
I2C_Master_Begin(); // Start condition
I2C_Master_Write(module_address_write); // 7 bit address + Write
I2C_Master_End();

I2C_Master_Begin(); // Start condition
I2C_Master_Write(calib_AC6_MSB); // Register Address
I2C_Master_End();

I2C_Master_Begin(); // Start condition
I2C_Master_Write(module_address_read); // 7 bit address + Read
AC6H = I2C_Master_Read(0); // Read + Acknowledge
AC6L = I2C_Master_Read(0); // Read + Acknowledge
I2C_Master_End();

AC6 = (AC6H << 8) + AC6L;

// Reading MC
I2C_Master_Begin(); // Start condition
I2C_Master_Write(module_address_write); // 7 bit address + Write
I2C_Master_End();

I2C_Master_Begin(); // Start condition
I2C_Master_Write(calib_MC_MSB); // Register Address
I2C_Master_End();

I2C_Master_Begin(); // Start condition
I2C_Master_Write(module_address_read); // 7 bit address + Read
MCH = I2C_Master_Read(0); // Read + Acknowledge
MCL = I2C_Master_Read(0); // Read + Acknowledge
I2C_Master_End();

MC = (MCH << 8) + MCL;

// Reading MD
I2C_Master_Begin(); // Start condition
I2C_Master_Write(module_address_write); // 7 bit address + Write
I2C_Master_End();

I2C_Master_Begin(); // Start condition
I2C_Master_Write(calib_MD_MSB); // Register Address
I2C_Master_End();

I2C_Master_Begin(); // Start condition
I2C_Master_Write(module_address_read); // 7 bit address + Read
MDH = I2C_Master_Read(0); // Read + Acknowledge
MDL = I2C_Master_Read(0); // Read + Acknowledge
I2C_Master_End();

MD = (MDH << 8) + MDL;

// Temperature (Registers used: UTH,UTL,X1,X2,B5)
int32_t X1, X2, B5;
int8_t UTH, UTL;
int32_t UT;
 
int8_t T;

// Reading UT (Uncompensated Temperature) //////////////////////////////
// Writing CTRL
I2C_Master_Begin(); // Start condition
I2C_Master_Write(module_address_write); // 7 bit address + Write
I2C_Master_End();

I2C_Master_Begin(); // Start condition
I2C_Master_Write(ctrl_meas); // Register Address
I2C_Master_End();

I2C_Master_Begin(); // Start condition
I2C_Master_Write(0x2E); // Writing 0x2E into CTRL MEAS
I2C_Master_End();

__delay_ms(5); // Wait at least 4.5 ms

// Reading Data MSB and Data LSB
I2C_Master_Begin(); // Start condition
I2C_Master_Write(module_address_write); // 7 bit address + Write
I2C_Master_End();

I2C_Master_Begin(); // Start condition
I2C_Master_Write(DATA_MSB); // Register Address
I2C_Master_End();

I2C_Master_Begin(); // Start condition
I2C_Master_Write(module_address_read); // 7 bit address + Read
UTH = I2C_Master_Read(0); // Read + Acknowledge
UTL = I2C_Master_Read(0); // Read + Acknowledge
I2C_Master_End();

UT = (UTH << 8) + UTL;

// True Temperature Calculation
X1 = (UT-AC6)*AC5/32768;
X2 = (MC*2048)/(X1+MD);
B5 = X1+X2;
T = (B5+8)/16;

char Temp_DecimX = 0;
char Temp_OnesX = 0;
char Temp_TensX = 0;
 
Binary_BCD_ASCIIConverter(&Temp_DecimX, &Temp_OnesX, &Temp_TensX, T); // Converting Binary to BCD to ASCII

*Temp_Decim = Temp_DecimX;
*Temp_Ones = Temp_OnesX;
*Temp_Tens = Temp_TensX;

return;
}
 
 
 

post edited by delfindelfin - 2019/07/04 18:35:49

MPLAB X IDE v5.05
XC8 2.00
#26
ric
Super Member
  • Total Posts : 24593
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: offline
Re: I2C Interfacing XC8 PIC16F877A 2019/07/04 18:37:37 (permalink)
+1 (1)
You don't reveal what the raw reading was before the calculations.
The link in post#25 has an Excel spreadsheet that lets you check all the intermediate calculations.
 
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#27
pcbbc
Super Member
  • Total Posts : 1381
  • Reward points : 0
  • Joined: 2014/03/27 07:04:41
  • Location: 0
  • Status: offline
Re: I2C Interfacing XC8 PIC16F877A 2019/07/05 01:14:07 (permalink)
+1 (1)
Something is probably being truncated to a 16 bit result. MC*2048 looks to be at least one likely culprit.
Try casting MC to an int32_t
But without the actual values for all the calibration constants and sensor reading it’s impossible to say for sure.
#28
1and0
Access is Denied
  • Total Posts : 9989
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: I2C Interfacing XC8 PIC16F877A 2019/07/05 11:06:27 (permalink)
+3 (3)
delfindelfin
Well, this is my code .. But it is wrong since what I get is 40.9 C .. When I should get 20.0 C

// True Temperature Calculation
X1 = (UT-AC6)*AC5/32768;
X2 = (MC*2048)/(X1+MD);
B5 = X1+X2;
T = (B5+8)/16;


Reiterating what I've said in your other threads, you really need to learn how to debug your own code, instead of running to others each and every time you come to a problem.  In this case, put a breakpoint an the above snippet, single step thru it, and verify the values from your Watch window with values manually calculated with a calculator or the above-mentioned Excel spreadsheet. Then you will see what and where is your problem.
 
#29
delfindelfin
Super Member
  • Total Posts : 387
  • Reward points : 0
  • Joined: 2017/01/19 12:32:58
  • Location: Mexico
  • Status: offline
Re: I2C Interfacing XC8 PIC16F877A 2019/07/05 19:50:58 (permalink)
0
Where do I have to look in the datasheet to see what is the maximum current the PIC can supply through its PORTs?

MPLAB X IDE v5.05
XC8 2.00
#30
ric
Super Member
  • Total Posts : 24593
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: offline
Re: I2C Interfacing XC8 PIC16F877A 2019/07/05 21:07:06 (permalink)
+1 (1)
"Electrical Specifications" down the end.
The voltage will drop pretty quickly with current, so it won't be anywhere near VDD if you pull close to the maximum current.
If you're looking in the PIC16F877A datasheet, under "ABSOLUTE MAXIMUM RATINGS" it says you MUST NOT pull more than 25mA from any pin, or 200mA total from any PORT.
Later on, under "Output high voltage", to maintain a voltage of at least Vdd - 0.7V, you can't pull more than 3mA out of a pin.
Even later, under "FIGURE 18-18: TYPICAL, MINIMUM AND MAXIMUM VOL vs. IOL (VDD = 5V, -40C TO +125C)"
It shows a graph of voltage against current. You can see if you pull 15mA, with a supply of 5V, the output voltage at 25 deg C will be about 3.8V
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#31
pcbbc
Super Member
  • Total Posts : 1381
  • Reward points : 0
  • Joined: 2014/03/27 07:04:41
  • Location: 0
  • Status: offline
Re: I2C Interfacing XC8 PIC16F877A 2019/07/06 02:24:12 (permalink)
+1 (1)
delfindelfin
Where do I have to look in the datasheet to see what is the maximum current the PIC can supply through its PORTs?

Why suddenly this question?
Are you powering the sensor from a PIC port pin? That would probably be a bad idea....
#32
delfindelfin
Super Member
  • Total Posts : 387
  • Reward points : 0
  • Joined: 2017/01/19 12:32:58
  • Location: Mexico
  • Status: offline
Re: I2C Interfacing XC8 PIC16F877A 2019/07/06 07:25:25 (permalink)
0
pcbbc
Why suddenly this question?
Are you powering the sensor from a PIC port pin? That would probably be a bad idea....

No, I am not going to power it from a PIC port pint .. But I am going to need to supply current to an OptoTriac in another Project ..
 
ric
Even later, under "FIGURE 18-18: TYPICAL, MINIMUM AND MAXIMUM VOL vs. IOL (VDD = 5V, -40C TO +125C)"
It shows a graph of voltage against current. You can see if you pull 15mA, with a supply of 5V, the output voltage at 25 deg C will be about 3.8V

But. How do you interpret the graph? .. According to the table on page 179, VOL means Output High Voltage .. In the graph 18.18, if you I pull 15mA, with a supply of 5V, at 25 deg C, VOL will be 0.35 (more or less) .. How do you get the figure of 3.8V?
 
Umm, the maximum current a PIC port pin can receive is 25 mA, right? Is there a graph for that too?
post edited by delfindelfin - 2019/07/06 07:34:48

MPLAB X IDE v5.05
XC8 2.00
#33
1and0
Access is Denied
  • Total Posts : 9989
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: I2C Interfacing XC8 PIC16F877A 2019/07/06 10:47:54 (permalink)
+1 (1)
delfindelfin
No, I am not going to power it from a PIC port pint .. But I am going to need to supply current to an OptoTriac in another Project ..

Changed the subject so suddenly ... distraction? :(  Have you fixed the math problem yet?
 

 
But. How do you interpret the graph? .. According to the table on page 179, VOL means Output High Voltage .. In the graph 18.18, if you I pull 15mA, with a supply of 5V, at 25 deg C, VOL will be 0.35 (more or less) .. How do you get the figure of 3.8V?

You asked about "supplying current" so it should be obvious the correct parameter is VOH, not VOL which by the way does NOT "means Output High Voltage".  Anyway, the figure Ric meant to refer to is Figure 18-16 "VOH vs IOH".
 

Umm, the maximum current a PIC port pin can receive is 25 mA, right? Is there a graph for that too?

Do you even know the difference between "sink" and "source"? Yes, there should be graphs for VOL and VOH. Have you tried looking in your datasheet?
#34
ric
Super Member
  • Total Posts : 24593
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: offline
Re: I2C Interfacing XC8 PIC16F877A 2019/07/06 13:04:39 (permalink)
0
Oops, copied the wrong table title. I meant to grab the Voh one.

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#35
delfindelfin
Super Member
  • Total Posts : 387
  • Reward points : 0
  • Joined: 2017/01/19 12:32:58
  • Location: Mexico
  • Status: offline
Re: I2C Interfacing XC8 PIC16F877A 2019/07/06 19:34:58 (permalink)
0
1and0
Changed the subject so suddenly ... distraction? :(  Have you fixed the math problem yet?

Well, I was supposed to be debugging .. But, How do I simulate the hardware while debugging? Because I need to get the values of the calibration constants .. Altough, I think I should probably give them constant values ... And just check the math .. By the way .. Does anyone of you have you used the debug mode of PICKIT3? Do you recommend use it? 
 
Also, the problem is that I need to know the Calibration Constants in the Simulation .. So .. Should I display them on an LCD one by one? Or should I use UART communication to get those values .. Because .. I am not sure if I going to have some problems modifying my doubble dabble algorithm to convert complement's two negative numbers to BCD to ASCII to display them on the LCD ... I am thinking what I am going to do ..
post edited by delfindelfin - 2019/07/06 20:30:10

MPLAB X IDE v5.05
XC8 2.00
#36
PStechPaul
Super Member
  • Total Posts : 2441
  • Reward points : 0
  • Joined: 2006/06/27 16:11:32
  • Location: Cockeysville, MD, USA
  • Status: offline
Re: I2C Interfacing XC8 PIC16F877A 2019/07/06 21:34:29 (permalink)
+1 (1)
I use the PICkit3 for debugging, sometimes, when I need to see what's happening with the actual hardware. But more often I use the MPLABX software simulator, because it provides unlimited breakpoints, stopwatch, logic analyzer, and quick and easy access to SFRs, GPRs, and memory. I also sometimes use LEDs on otherwise unused ports to provide indication of program status while running.
 
Some of these techniques may derive from my past experience with embedded processing where I used emulators for 8085 and Z80 processors, and I wrote diagnostic code for the user interface (3x4 keypad and 2x8 character LCD), to examine and exercise memory and I/O ports.
 
So that may be why I don't quite "get" why you are having such trouble diagnosing your issues.

 
#37
ric
Super Member
  • Total Posts : 24593
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: offline
Re: I2C Interfacing XC8 PIC16F877A 2019/07/06 23:57:56 (permalink)
0
delfindelfin
...
Does anyone of you have you used the debug mode of PICKIT3? Do you recommend use it? 

Yes, often. I assumed you were already using it.

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#38
pcbbc
Super Member
  • Total Posts : 1381
  • Reward points : 0
  • Joined: 2014/03/27 07:04:41
  • Location: 0
  • Status: offline
Re: I2C Interfacing XC8 PIC16F877A 2019/07/07 02:12:18 (permalink)
+1 (1)
delfindelfinI am not sure if I going to have some problems modifying my doubble dabble algorithm to convert complement's two negative numbers to BCD to ASCII to display them on the LCD ... I am thinking what I am going to do ..

Check if the number is negative. If it is, display a minus sign, and invert the sign of the number so it becomes positive.
Then just display the number as normal.
Your double dabble will need extending to cope with more decimal digits for full 16 bit numbers.
#39
delfindelfin
Super Member
  • Total Posts : 387
  • Reward points : 0
  • Joined: 2017/01/19 12:32:58
  • Location: Mexico
  • Status: offline
Re: I2C Interfacing XC8 PIC16F877A 2019/07/07 12:33:15 (permalink)
0
pcbbc
Check if the number is negative. If it is, display a minus sign, and invert the sign of the number so it becomes positive.
Then just display the number as normal.
Your double dabble will need extending to cope with more decimal digits for full 16 bit numbers.

All right, thanks, this my be a silly question, but I know if a 2's complement number is negative by just checking if the MSB is 1, right? .. But, then, for example, if I am working with an 8-bit variable .. That means the range of numbers I can use is "0000 0000" to "0111 1111", right?  ... Shouldn't I do something else, like, invert the digits and subtract 1 to do the convertion? .. 
 
Edit: Oo .. I think by "invert the sign" you meant "invert the digits and subtract 1" .. I think it was that ..
post edited by delfindelfin - 2019/07/07 12:45:43

MPLAB X IDE v5.05
XC8 2.00
#40
Page: < 12345.. > >> Showing page 2 of 6
Jump to:
© 2019 APG vNext Commercial Version 4.5