开发者

read port RB7 or other port from PICF184550 in program language C

开发者 https://www.devze.com 2023-02-18 07:51 出处:网络
I\'m using the picdem F184550, I want to read the value of the led, I\'m using the mplab ide v8.63 with a C compiler. but I don\'t have a idea how to interface with the port RB7 where my led with a re

I'm using the picdem F184550, I want to read the value of the led, I'm using the mplab ide v8.63 with a C compiler. but I don't have a idea how to interface with the port RB7 where my led with a resis开发者_如何学Pythontor is connected to. The question is, how can I read the port RB7 where my led is connected to in the program language C. thanks! (see picture

read port RB7 or other port from PICF184550 in program language C


This depends on the compiling suite you are using.

Those provided by Microchip (C18 for 18F MCUs) usually define all available ports & registers in a header file specific to your device (something like p18F4550.h in your case).

In this header, you will have a structure definition corresponding to your specific port register. You can access to your specific RB7 I/O,within the following field : PORTBbits.RB7

0

精彩评论

暂无评论...
验证码 换一张
取 消