View previous topic :: View next topic |
Author |
Message |
Regular Guy
Joined: 04 Jun 2017 Posts: 110
|
PIC 16F84A Development Breadboard |
Posted: Tue Nov 03, 2020 4:07 pm |
|
|
Putting together hardware for our assembler lessons.
Using 32khz crystal and 68p capacitors.
Two 840 hole breadboards. Connected together.
QUESTION
Are you supposed to work on it with breadboards sideways or straight up
and down?
We have been keeping them straight up and down. The letters and numbers
on them go that way.
Have seen a lot of pictures over the years with the breadboards sideways.
Thanks! _________________ PIC Hobbyist |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9241 Location: Greensville,Ontario
|
|
Posted: Tue Nov 03, 2020 5:05 pm |
|
|
whatever works for you, there is not 'right or wrong'.
I have one in front of me, horizontal as the LCD module hangs off the lower right corner. above it is the TTLUSB module and a combo RTC/EEP module. To the left is the 18F46k22 ,and furthest left the ICSP connections. |
|
|
Regular Guy
Joined: 04 Jun 2017 Posts: 110
|
|
Posted: Tue Nov 03, 2020 5:21 pm |
|
|
Code: | ; HEADER84.ASM for 16F84. This sets PORTA as an INPUT (NB 1means
input).
; and PORTB as an OUTPUT (NB 0 means output).
;The OPTION Register is set to /256 to give timing pulses of 1/32 of a second.
;1second and 0.5 second delays are included in the subroutine section.
list p=16F84A ; list directive to define processor
#include <p16F84a.inc> ; processor specific variable definitions
__CONFIG _CP_OFF & _WDT_ON & _PWRTE_ON & _RC_OSC
RESET_VECTOR CODE 0x0000 ; processor reset vector
goto start ; go to beginning of program
MAIN_PROGRAM CODE
start:
; remaining code goes here
;CONFIGURATION SECTION
START BSF STATUS,5 ;Turns to Bank1.
MOVLW B’00011111’ ;5bits of PORTA are I/P
MOVWF TRISA
MOVLW B’00000000’
MOVWF TRISB ;PORTB is OUTPUT
MOVLW B’00000111’ ;Prescaler is /256
MOVWF OPTION_R ;TIMER is 1/32 secs.
BCF STATUS,5 ;Return to Bank0.
CLRF PORTA ;Clears PortA.
CLRF PORTB ;Clears PortB.
;*********************************************************
;Program starts now.
goto $
END ; directive 'end of program' |
_________________ PIC Hobbyist |
|
|
Regular Guy
Joined: 04 Jun 2017 Posts: 110
|
|
Posted: Tue Nov 03, 2020 5:23 pm |
|
|
Thanks Jay
Posted code for our header file.
Which we will use in each new program.
Ignore the bunched up Configuration section.
That is from copying from Adobe Acrobat .PDF
We have become experts at tabbing.
Thanks! _________________ PIC Hobbyist |
|
|
|