Questions tagged [pic18]

The PIC18 series 8 bit microcontrollers manufactured by Microchip Technology.

230 questions
-2
votes
1 answer

Low frequencies measurement

I am new to the forum. I am recording the RPM, and show it on 4x seven segments with CCP2. It actually works quite well from about 3.81Hz to about 166Hz, which is enough upwards. I measure the frequency based on each rising edge (waiting for a…
-2
votes
1 answer

PIC18 Signal Measurement Timer SMT1 (Counter Mode) Not Incrementing

I'm trying to use SMT1 on a PIC18F45K42 to count cycles of a square wave on pin RB0. I can't get the counter to increment, not sure what I'm doing wrong. If I understand correctly, SMT1TMR should be incrementing but it's not. (I also checked…
kjav
  • 93
  • 1
  • 7
-2
votes
1 answer

PIC18F46J50 EEPROM read/write

The project i am working is as below: I got ADuC7061's USART is connected with PIC18F46j50 EUSART. the aduc7061 continously transmits an information and the pic18f receives that information through its eusart0. Now the question is that I have to…
akumar
  • 49
  • 1
  • 9
-4
votes
1 answer

PIC18F2220 LED blinking program error

I am a beginner in PIC programming. This video I have used to code my first program. This is the code I have written: #include #include #include "XC8.h" void main(void) { TRISBbits.RB0 = 0; OSCCON = 0x76; while(1) …
vt673
  • 127
  • 1
  • 6
-4
votes
1 answer

Force printf to use two characters

I'm using this code on a PIC18 device with the XC8 compiler: printf("%x", (unsigned char) some_value); When some_value is below 0xf0, only one digit is outputted, e.g. c for the value 12. On values above 0x0f, two digits are outputted, e.g. 42 for…
user1544337
1 2 3
15
16