I was checking your nice tutorial from here:
https://electrosome.com/i2c-pic-microcontroller-mplab-xc8/
<div class=”post-message ” dir=”auto” data-role=”message”>
<div>
I decided to try it with PIC18F4550 to PIC18F4550 and I went in troubles.
I have tested your Proteus project with PIC16F877A and works fine.
Then I decided to replace PIC16F877A with PIC18F4550.
I have an error and maybe you can take a look and give some hints. The error comes from Slave code.
I made the changing from PIC16F877A to PIC18F4550 in 2 steps.
In the first step I have changed only the Master with PIC18F4550 and the Slave was still PIC16F877A.
Everything worked fine here. In my case the Master only reads from Salve and display the switches result on LEDs.
Here is the screenshots and XC8 code, the Master C code and “pro2.zip” with Proteus + MPLABX full XC8 code for Master and Slave:
https://goo.gl/uTijwg
This project works fine.
In the second step I have changed also the Slave with PIC18F4550.
Here is the screenshots and XC8 code, the Master and the Slave C code and “pro3.zip” with Proteus + MPLABX full XC8 code for Master and Slave:
https://goo.gl/dnGDMQ
Here I have a problem and for sure comes from Slave XC8 code.
When I compile it says “variable “_z” is not used” and “portion of expression has no effect” where z is used.
Could you please help to debug the problem?
</div>
</div>
I will give you some guidance. You can connect the FSR in series with a resistor (10K) across the supply (VCC and GND). You can connect the center point to the ADC input.
Now you can easily read the ADC values which will change depending upon the applied force. You can only get the variation of force by this. For calibration you need to do a lot of practical tests. There is no short cut.
]]>You can follow our tutorials and if you need any further help, please post it in forums or comments section.
]]>i am new to electronics so please help me with design and circuit diagrams
i would really appreciate it
thanks
Regards.
]]>I think you should go for a small microcontroller for that. Otherwise it will be very difficult to make it with simple digital circuits. Using a small microcontroller will reduce the cost, complexity etc.
]]>