Yes, a blocking delay will use a loop.exist a loop in L_Delay_5500us3
L_Delay_5500us3:
0x0013 0x0BFD DECFSZ R13, 1
0x0014 0x2813 GOTO L_Delay_5500us3
Agreed, but a small point - it's a 10-bit ADC...[...] 12 bit ADC value [...]
hi,lcd work but adc_read(); don't work
can any one give me an example on adc with pic16f877a with source code since i'm beginner in microcontroller?
ANSEL = 0x00; // Configure all pins with ADC option
ANSELH = 0; // as digital I/O
C1ON_bit = 0; // Disable comparators
C2ON_bit = 0;
Not on a pic16f877a you won't.... It hasn't got any ansel registers.... ADCON1 = 0x7;@Alicp
As a beginner it could be smart to always include this code in your program
And if you need analog input rather set the needed bit in the corresponding ANSEL(H) register bits separately. By default after a reset pins with ADC input function are configurated as analog input NOT digital IORich (BB code):ANSEL = 0x00; // Configure all pins with ADC option ANSELH = 0; // as digital I/O C1ON_bit = 0; // Disable comparators C2ON_bit = 0;
1.)Put it in code tags! (The button that looks like"#" above your post's edit box - it surrounds your code with [CODE ] and [/CODE ] tags, minus the added spaces, so your post doesn't make the page gigantic)[the entire generated hex file... [...]
... even with MCLR turned off in the configuration?Not on a pic16f877a you won't.... It hasn't got any ansel registers.... ADCON1 = 0x7;
But that's not his problem... In ISIS he need to set MCLR pin otherwise it will not simulate...
MCLR is not configurable on the pic16f877a...tshuck said:... even with MCLR turned off in the configuration?
So it will let you simulate without a clock, but a missing pull up breaks it?
| Thread starter | Similar threads | Forum | Replies | Date |
|---|---|---|---|---|
|
|
PROGRAMING TRAFFIC LIGHT - PIC 16f877a Using Mplab XC8 | Homework Help | 1 | |
|
|
pic 16f877a code problem,"freq2write"query. | Microcontrollers | 2 | |
|
|
Pic 16f877a | Microcontrollers | 9 | |
| D | spwm using pic 16f877A | Power Electronics | 2 | |
|
|
The Canakit 2 and Pic 16F877a (?) | Programming & Languages | 6 |