Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC Analog Tutorial

Status
Not open for further replies.

aljamri

Member
I'm doing Analog Tutorial from Nigel's. (Tutorial # 11), replaced 16f876 with 16f876a. LCD not seemed initialized, regardless hardware double check the following findings still exist:

• LCD not initialized ( top line blocks only )
• If +5 volts connection to MCLR ( pin #1 ) moved two, three times, LCD initialized,
• When LCD initialized, it may show two lines or one line sometimes.
• If the LCD shows two lines, it removes the first an second characters from Tutorial ( appears torial )

Note: I could not find 12 Pico Capacitors for Main Board 2, I put 6 Picos.

Is there any thing wrong in all of these.

Thanks
 
I'm doing Analog Tutorial from Nigel's. (Tutorial # 11), replaced 16f876 with 16f876a. LCD not seemed initialized, regardless hardware double check the following findings still exist:

• LCD not initialized ( top line blocks only )
• If +5 volts connection to MCLR ( pin #1 ) moved two, three times, LCD initialized,
• When LCD initialized, it may show two lines or one line sometimes.
• If the LCD shows two lines, it removes the first an second characters from Tutorial ( appears torial )

Note: I could not find 12 Pico Capacitors for Main Board 2, I put 6 Picos.

Is there any thing wrong in all of these.

Thanks

Have you altered the config word?.

Try 0x2909 for the 876A.
 
Yes Nigel I replaced it with It's 0x290A as per your previous recomendation, or it is It's 0x2909 ?

i'll try both tommorow and let you know.

thanks.
 
And what about 6 Pico instead of 12, is it ok ?


by the way i've repeated all LED tutorial using 16f876.a and they work, then i've repated LCD tutorials and they worked well except for the first or/and second characters are missing from both lines.

Thanks
 
And what about 6 Pico instead of 12, is it ok ?


by the way i've repeated all LED tutorial using 16f876.a and they work, then i've repated LCD tutorials and they worked well except for the first or/and second characters are missing from both lines.

Thanks

As long as it's oscillating the capacitor values make little difference.

Try increasing the delays a little, your LCD may require more time?.
 
Still no result, I tried LCD Tutorial, and everything is ok expect the first character in top line was not shown.

I replaced

Code:
		movlw	0x07
		movwf	CMCON		;turn comparators off (make it like a 16F84)


with this

Code:
		BANKSEL ADCON1		;disable A2D
    		movlw   0x06
    		movwf   ADCON1
    		BANKSEL PORTA


As recommended in tutorials, is that ok even I'm doing Analog input.

I'll try playing with Delay and let you know

Thanks
 
Code:
		BANKSEL ADCON1		;disable A2D
    		movlw   0x06
    		movwf   ADCON1
    		BANKSEL PORTA

As recommended in tutorials, is that ok even I'm doing Analog input.

Putting 6 in ADCON1 will make all inputs digital. You need to refer to section 11 of the data sheet to work out the value required in ADCON1. You don't state which analogue input you are using so I cannot advise a value.

BTW, the default value for CMCON is 7 and so the comparators are switched off anyway.

Mike.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top