Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PIC 16f84 Assembly Language Programming questions

Status
Not open for further replies.

JohnVR

Technical User
Jul 7, 2001
1
0
0
US
Is there anyone out there familiar with MPlab, picstart, MPASM, and assembly language programming?

I am building a project where I use sensors to detect doors and windows being left open, transmitting this information wireless and addressing a 16F84 pic which in turn serially
sends messages to drivers for 10 each seven segment displays.
I am having trouble with the program and am looking for someone help me with the errors and maybe a better way of using look-up tables and serial transmitting using the pic
16f84. I have been reading Easy Pic'n and serial pic'n and pic'n up the pace.

JohnVR
HogFarmerJohn@aol.com
 
I'm familiar with MPlab & MPASM, and have done a little bit of programming with the PIC. The only way, except using the eeprom, to do a lookup table in with a PIC MCU is to do something like this:

Put the number to be "looked up" in W and then,
call getdigit

;code below is a subroutine that returns your # in W (It was some seven segment codes for a project of mine. Make sure that the number in W doesn't exceed the length of the lookup table or your program will be in LaLa land.)

getdigit
addwf PCL,F
digits
retlw 0x11 ;0
retlw 0x77 ;1
retlw 0x29 ;2
retlw 0x23 ;3
retlw 0x47 ;4
retlw 0x83 ;5
retlw 0x81 ;6
retlw 0x37 ;7
retlw 0x01 ;8
retlw 0x03 ;9




Kim_Christensen@telus.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top