Here's the link to Microchips flash training modules; http://techtrain.microchip.com/x14/
Those are pretty interesting.
Gives me a few ideas too.
DT
Your game was fun, I got a 109 (better hit the books again)
I have been migrating an application from a 16F887 to a 18F4420. After some debug (few hardware issues - oops!) the two output ports are doing great (B & D). Thanks to you Darrel my Timer 01 interupt is clicking away. I was able to change the config1h register to use the 4x PLL oscillator. But I am having trouble getting my input ports (A & E ) to function (very ashamed )
Oddly enough, there is one bit of the A port that works (bit 4). The rest of inputs on port A and E ignore me. Hardware check of pins show normal (pulled to Vdd via resistor with contact closure dragging them to Vss when applied)
Below is the I/O setup from my program:
================================================== ======
' ~~~~~~~~~~~~~~~~~~~ Define A I/O Port and Define Analog I/O ~~~~~~~~~~~~~~~~~~~
PORTA = %00000000 ' clearing bits as recommended in data sheet
ADCON0 = %00000000 ' turn off all A/D
ADCON1 = %00000111 ' turn off all A/D I/O points - make digital
TRISA = %00111111 ' bits 0-5 declared as inputs
' ~~~~~~~~~~~~~~~~~~~ Define B I/O Port ~~~~~~~~~~~~~~~~~~~
TRISB = %00000000 ' bits 0 declared as output
' ~~~~~~~~~~~~~~~~~~~ Define C I/O Port ~~~~~~~~~~~~~~~~~~~
PORTC = %00000000 ' clearing bits as recommended in data sheet
TRISC = %11110000 ' bits 4,5,6,7 defined as inputs
; LATC = %00000000 ' bits 0,1,2,3 declared as output
' ~~~~~~~~~~~~~~~~~~~ Define D I/O Port ~~~~~~~~~~~~~~~~~~~
TRISD = %00000000 ' bits 0-7 declared as output
; LATD = %00000000
' ~~~~~~~~~~~~~~~~~~~ Define E I/O Port ~~~~~~~~~~~~~~~~~~~
PORTE = %00000000 ' clearing bits as recommended in data sheet
TRISE = %00000111 ' bits 0,1,2 declared as inputs
' bits 3-7 declared as output
' to prototype Application inputs
================================================== ======
Does this look as you would expect? Got any other areas you would recommend I check - I think I am close to being able to recite the 18FXX2 data sheet, but it doesn't mean I might be overlooking something.
Try ADCON1 = %00001111. Deduct 1 point from your score...;o}
Wow Bruce you are correct! But did I miss an errata sheet or is my trouble reading the table in the attached document
---------------------------------------------------------------------------
In any event I am back in the running. I owe you for this. You can take five of my points and add to your score.
Thanks again
I'm not sure what to tell you about the MS Word DOC, but here's what's in the 18F4420
datasheet.
I think I figured it out Bruce
You provided data from Publication - DS39631E
=============================
PIC18F2420/2520/4420/4520
Data Sheet
28/40/44-Pin Enhanced Flash
Microcontrollers with 10-Bit A/D
and nanoWatt Technology
=============================
I was reading from publication - DS39564C (appears an earlier pub)
=================================
PIC18FXX2
Data Sheet
High-Performance, Enhanced Flash
Microcontrollers with 10-Bit A/D
=================================
I don't remember how I got the one I was using, but it is WRONG
concerning the ADCON1 register. I will be ceremonially disposing of the
incorrect publication this evening, it is sure to be festive event.
Once again "garbage in, garbage out".
Thanks again
Bookmarks