Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Bit addressable area

Status
Not open for further replies.

tuls

New Member
how can i set/clr a bit of a byte in General purpose RAM of PIC16f877A?

or in other words what's the address of bit addressable RAM bytes?
 
tuls said:
how can i set/clr a bit of a byte in General purpose RAM of PIC16f877A?

or in other words what's the address of bit addressable RAM bytes?

All GPR's are bit addressable, just use the name you gave them when you allocated them. You 'could' use the specific address, but it would be pretty silly, and exceptionally bad practice.

For example, this is from one of my tutorials.


Code:
bsf	Flags2,	New

and from the setup at the beginning of the program.

Code:
		cblock	0x20			;start of general purpose registers
			count			;used in looping routines
			count1			;used in delay routine
			counta			;used in delay routine
			countb			;used in delay routine
			LoX
			Bit_Cntr
			Cmd_Byte
			Dev_Byte
			Flags
			Flags2
			tmp1			;temporary storage
			tmp2
			tmp3
			lastdev
			lastkey

		endc


New		Equ	0x07
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top