PIC COMPUTER ARCHITECTURE We have a look at the 18F1220 block diagram, and relate it to operations the chip can produce. The block diagram gives a schematic overview of the functional blocks present on the chip surface in the form of electronics circuits. - the Arithmetic Logic Unit (ALU) - the Working REGister (WREG) and the data bus - BIT OP and the 8 x 8 multiply - the Instruction Register (IR) - the instruction decoder - the Program Counter (PC) and flash memory - the hardware return stack. - the data ram - special function registers - the FSR indirect addressing registers - I/O ports - A/D converter - USART - timer + interrupts BINARY NUMBERS - perform decimal addition - perform binary addition as dumb symbol manipulation - build a table of binary numbers by incrementing from 0 - find the pattern - complete the table using the pattern instead of addition - complete the table with binary <-> hexadecimal - hex in your head? 0 F 1 2 4 8 - negative numbers (infinite) - finite negative numbers - sign bit convention - multiplication and bit shifts - left shift (maybe overflow) - signed and unsigned right shift - the carry flag - rotation and carry flag PROCEDURE WORDS AND MACROS - composition and the return stack - procedure words - macros - compilation: translate forth -> machine code (macros are problematic. maybe wait with explaining them until forth in fingers?) SHEEPSINT - timers and intterupts - 4 oscilliator updates: sync + mixer - synth variable (syth instruction register) - period variables - route: implementing bytecodes (mix) - sync-tick: binary counter sync on bits INTERACTION - uploading code 'ul' - installing boot and isr 'install'