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.

C Block Compact Code

Status
Not open for further replies.

Suraj143

Active Member
I want to declare 192 GPR in C block.Is there any easy way of doing it without writing all 192 bytes in C block? I use PIC16F88

Will this work?

cblock 110h
Byte:60h ;96 bytes
endc

cblock 190h
Byte:60h ;Next 96 bytes
endc
 
That should work but the areas will have a gap between them. How do you intend to access this 192 byte block?

Mike.
 
I want to declare 192 GPR in C block.Is there any easy way of doing it without writing all 192 bytes in C block? I use PIC16F88

Will this work?

cblock 110h
Byte:60h ;96 bytes
endc

cblock 190h
Byte:60h ;Next 96 bytes
endc

You can use the decimal numeral as well (hex not required). Just make sure all of the registers are available before making an assignment. That is, make sure they are not reserved as special function registers.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top