PIC microcontroller CCS C language (#USE FIXED_IO usage)

Publisher:PositiveVibesLatest update time:2016-09-27 Source: eefocusKeywords:CCS  USE  FIXED_IO Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
#USE FIXED_IO

语法:#use fixed_io(port_outputs=pin.pin?)

port is A~G.

pin is one of the pins defined in the device.h file.

Purpose: Affects how the compiler generates input and output code, as described below. This instruction is valid until the next #use xxxx_io appears. Executing the method to set I/O will cause the compiler to generate code that makes the I/O either an input or an output each time it is used. The pin is programmed according to the information in the I/O direction register (the I/O direction register is actually implemented but not operated on), which will store a byte in the RAM used by standard I/O.

Example: #use fixed_io(a_outputs=PIN_A2,PIN_A3) //Set PINA2 and PIN_A3 as outputs

Keywords:CCS  USE  FIXED_IO Reference address:PIC microcontroller CCS C language (#USE FIXED_IO usage)

Previous article:PIC microcontroller CCS C language (#UNDEF usage)
Next article:PIC microcontroller CCS C language (#USE FAST_IO usage)

Recommended ReadingLatest update time:2024-11-16 19:25

PIC microcontroller CCS C language (application of #INT_DEFAULT)
#INT_DEFAULT Syntax: #int_default Purpose: If the PIC triggers an interrupt and no interrupt flag is set, the following function will be called. If there is an interrupt flag, but it is never triggered, the #int_default function will also be called. Example: #int_default default_isr(){ printf(“Unexplained inte
[Microcontroller]
Littelfuse Completes Acquisition of C&K
Littelfuse announced on August 12, 2022 the completion of its acquisition of C&K Switches (“C&K”). C&K is a leading designer and manufacturer of high-performance electromechanical switches and interconnect solutions with a strong global presence in a wide range of end markets including industrial, transportation, aero
[Semiconductor design/manufacturing]
Power distribution system and E-Fuse in new energy vehicles
1 New energy vehicle power distribution system upgrade In the power distribution system of traditional vehicles, the ECU mainly controls the power supply of the vehicle electrical appliances through fuses and relays, including key switch relays, light relays, horn relays, etc. There are also some loa
[Embedded]
Power distribution system and E-Fuse in new energy vehicles
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号