Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC16F1783 Microcontroller Programming

Status
Not open for further replies.

John_25

Newbie level 3
Joined
Apr 8, 2015
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
31
Hello all, I am a new to PIC and stuck up with a couple of questions. Could you please help me.

1) a) Can you create the decision tree, IF-THEN-ELSE, using the PIC16 instruction set (in as few instructions as possible?
b) Will this decision tree get the same answers if the instructions are fetched sequentially from the ATE vector memory?

2) Using a PIC16F1783 create a program that will force a constant voltage of 1.5 Volts on a pin regardless of the VDD voltage.

I have solved the first part of Q1 and have some guesses about 1a and Q2 but need clarification.
 

1a. in what language? It is possible in assembly and high level languages like C. In assembly language it is possible in as little as two instructions.

1b. what do you mean by ATE vector memory? All instructions are fetched from internal memory storage locations.

2. Yes, you can use the internal FVR to drive the DAC and select a DAC output to generate 1.5V but the PIC isn't a voltage regulator and really, you shouldn't run it from anything other than a stable VDD voltage.

Brian.
 

Brain,

1a) It should be in assembly. I used "subtract" instruction to do that. If you have a better solution please let me know.

1b) I think ATE has a in-built memory to store test patterns. Let me know if you know more about this.

2) Yeah I had the same idea, got confirmed now.

Thanks!
 

1a. Subtract is a good option, it will set the flags in the status register. Z being set means the values are equal, the C flag tells you which one is bigger. From that you can deduce if it isn't bigger or the same, the value must be smaller.

1b. If by ATE you mean Automatic Test Equipment, yes some testers use stored test patterns (aka test vectors) but what has that go to do with PIC16F1783 ? By the way, I am qualified by HP, Genrad and Teradyne in digital device modelling and test systems programming.

Brian.
 

Brain

Q1b) I believe the ATE can operate in 2 or 3 modes and sequential mode is one of them. If the next instruction after the branch is sent to the PIC to execute without actually knowing the outcome of the branch, it might give wrong results (if the outcome of the branch instruction is taken). I guess this is what the question is trying to ask.(This is just my speculation. Didn't find much information on this online as well)

I am new to edaboard. My apologies if I have offended anyone.

Thanks! Looking forward to your reply.
 

No apologies needed, but my name is Brian not Brain!

I'm still confused over where ATE is involved in this. I am fully conversant with ATE techniques, I used to design ATE equipment for component and board level testing. What I don't understand is how you are sending instructions to the PIC when it can only execute instructions already in it's own internal memory. I see ATE as external equipment used to inject stimuli and monitor the effect on a circuit to verify it is responding correctly. Please the describe the ATE you are thinking of, is it a software simulation perhaps?

Brian.
 

Brian,

Actually this question was given to me as a take home quiz to solve. The first time I heard about ATE was when I saw this question. I am not sure which ATE he is referring to. Anyways thanks for the information.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top