WHAT IS THIS

Say "hi" here, and any general non PIC related chat.

WHAT IS THIS

Postby LED » Sat Oct 06, 2018 12:33 pm

Hello
What is this all single -cycle instruction except for program branches which are two cycle
LED
Banned
 
Posts: 40
Joined: Sat Jul 28, 2018 1:51 pm
PIC experience: EE Student

Re: WHAT IS THIS

Postby AussieSusan » Mon Oct 08, 2018 2:40 am

Given all of your other questions I assume this one is also trolling but....
Inside any MCU are a number of registers that can be accessed (read and written) directly by the execution unit. Look at just about any MCU datasheet and you will see a diagram of the code layout.
Also looking at the instructions the execution unit can perform, you will see that most interact with those internal registers. Also those instructions are a single programming word (which varies in size depending on the MCU family) so can be read from memory in a single cycle.
However the program branching and function call instructions need an address to branch/call to. Fetching that extra address from the program memory requires an additional cycle.
Depending on the MCU, there can be other instructions that use more than 1 instruction cycle - for example those that use an immediate value that must be read from memory or use some specialised bit of internal hardware.
Susan
AussieSusan
Verified identity
 
Posts: 173
Joined: Mon Jun 16, 2014 4:45 am
PIC experience: Experienced Hobbyist


Return to Introductions and general chat

Who is online

Users browsing this forum: No registered users and 5 guests

cron