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.

What does the inp() command do?

Status
Not open for further replies.

crocklip

Junior Member level 1
Joined
Nov 23, 2005
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,568
What is this command?

Hi,

I have been trying to convert some C code for an ATMEL2323 chip to code for a Microchip 16F877a.
The line of code for the 2323 chip that I cannot understand is this:

count += (count_hi << 8) + inp(TCNT0); // get counter value

where the count_hi is an overflow accumulator.

what does the inp() command do? and how could I implement this to a 16f887a?

Any help at all would be great! :D

Thanks.
 

Re: What is this command?

This is more like the user procedure, in the code find definition of Input() procedure, must be something like this :
void Input() void;

Also is a possible that this is a capture function, and TCNT0 is timer 0 or some other hardware device address. If you have full source code, you can see what exactly is TCNT0, in your C code yuo must have :
#include <some_procesor.h>
in this file you have a definition for all declaration, also declaration can be made in your .c file
#define TNCO 0x52 , for example.
Direct translation from Atmel to PIC is impossible, you must use other peripheral devices, and if use the procedure for time generation, you must recalculate this procedures.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top