on 10/1/02 9:52 AM, David J Binnington at david@DJBELECT.KEME.CO.UK wrote: Hi David, I am a newbie to the PIC (and Microcontrollers in general) but I (think) I can answer all of the questions correctly. However I could honestly not do the task you are employing the guy to do, and as an employer, I would not see any value in the following type of questionaire. > Question 1: > A 16F877 is to be used with a 20MHz crystal. Which of the following CONFIG > words would be the most appropriate? > > a) __FUSES _CP_OFF&_WDT_ON&_RC_OSC&_PWRTE_ON&_LVP_OFF&_BODEN_ON&_MCLRE_ON > b) __FUSES _CP_OFF&_WDT_ON&_XT_OSC&_PWRTE_ON&_LVP_OFF&_BODEN_ON&_MCLRE_ON > c) __FUSES _CP_OFF&_WDT_ON&_HS_OSC&_PWRTE_ON&_LVP_OFF&_BODEN_ON&_MCLRE_ON > d) Do not know Answer: c) - but wouldn't you want the Code Protect on? :-) > Question 2: > > The following code extract from a 16F628 program does not work as intended. > > ;PORTB Setup > ;----- > clrf STATUS,RP0 ;Set BANK 0 > movlw B'11111111' > movwf PORTB ;Set PORTB output latches to all 1's > > bsf STATUS,RP0 ;Set BANK 1 > > movwf TRISB ;Set PORT B to all outputs > > clrf STATUS,RP0 ;Set BANK 0 > > > What would be the result? > > a) Sets all I/O pins of PORT B to output 1 > b) Sets all I/O pins of PORT B to output 0 > c) Sets all I/O pins of PORT B to input or tristate > c) The state of PORTB cannot be determined Answer: c) - You missed loading the W register before the movf to TRISB > Question 3: > > A 16F877 has a 10MHz crystal. What is the execution time for a single cycle > instruction? > > a) 100nS > b) 4uS > c) 250nS > d) 400nS > e) None of the above Answer: d) How did I do? Throw some tough ones at them! :-) Regards, Sean Alcorn -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.