-
Search Results
-
Topic: How to use Interrupts
Hello,
How to use interrupts to LED ON/OFF using push button. Am using 16Bit PICMicrocontroller dsPIC33. Please suggest how to write code..
if (PORTBbits.RB5 == 1)
{
LATEbits.LATE6 = 1;
}
if (PORTBbits.RB5 == 1)
{
IFS1bits.CNIF = 1;
IFS1bits.INT2IF = 1;
IFS1bits.INT2IF = 1;
IFS1bits.INT2IF = 0;
}
by using this code only switched ON….
Topic: I2C PIC18F4550 to PIC18F4550
Hi,
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/dnGDMQHere 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>Greetings,
I have a few question to ask regarding my circuit in Proteus 8.6. I’ve constructed a circuit that posted in this link –> https://electrosome.com/switch-pic-microcontroller-hi-tech-c/ . I also built the program using the Hitech C compiler using Mplab software. And then, when I try to run the simulation in the Proteus using the hex file I built in Mplab, it didn’t even say error or something like that, instead, the led in the circuit itself won’t light up (no error message in Proteus while I run the simulation). I already tried to reinstall all my programming and other software (mplab, proteus, hitech c). But, it doesn’t work. What should I do? This is really stressing me out. This website is the only one where I can study more about Embedded Programming.
p/s: Pictures are included in this forum for reference.Thank you.
Topic: PIC18f4455 LCD
Hello I need help in putting an LCD display to my microcontroller. I am new to microcontrollers and I am trying to learn.
I have a PIC18f4455. Below you have the schematic.
I need help in how to put an LCD display 16×2 to my PIC18f4455.
Topic: How to use FSK RF Modules ?
I have purchased this item. I need to know how to program this item through microcontroller.
Hi,
I am working with PIC24EP512GU810 Microcontroller and LG128642 GLCD. First time i am working with GLCD.i gave the hardware connections as follows.
DB0 to DB7 : RD7 to RD14.
CS2 : RD1
CS1 : RD2
RST : RD0
E : RD4
i gave all signals to port D.now my problem is when i need to send data or command to data bus it effects the control signals.how can i send the data or commands to individual bits of port D which are connected to databus.
Thanks
Eshwar..
I am sending 32 bytes from master microcontroller using your I2C library. How can I do that ? Your library handles only single byte of information.
////SLAVE CODE DATA READ // if(!SSPSTATbits.D_nA && !SSPSTATbits.R_nW) { z = SSPBUF;//Address Read while(!BF); d=SSPBUF; //data Read SSPCONbits.CKP = 1; inputflag=1; }Convert an analog audio signal to digital with a PIC and send the data through serial to a blutooth Module HC05 or HC06
I want to convert an analog audio signal to digital signal and send it to serial input in blutooth Module. How can I do this?
Microcontroller used: PIC18f452
regard
