| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
AN2511 bảng dữ liệu(PDF) 22 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2511 bảng dữ liệu(HTML) 22 Page - STMicroelectronics |
|
22 / 43 page ![]() PMBus commands and source code AN2511 22/43 Doc ID 13286 Rev 2 3.3 Example This section explains how to use the PMBus driver. An example operation of write/ read commands are shown. /***************************************************************************** COPYRIGHT 2005 STMicroelectronics Source File Name : Main.c Group : IMS Systems Lab Author : Telecom Team Date First Issued: 01/09/2006 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- THE SOFTWARE INCLUDED IN THIS FILE IS FOR GUIDANCE ONLY. STMicroelectronics SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM USE OF THIS SOFTWARE. -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- ********************************Documentation********************************** General Purpose - Contains main source code. In this file, the PMBus command files are written. ******************************************************************************/ #include "ST7_config.h" /* Fcpu defined as 8MHz */ #include "main.h" /* Contains the global variables used in main.c */ #include "ST7_hr.h" /* Contains the register and flags for ST7 */ extern volatile unsigned int SMB_TimeCount; /* Time count variable */ #pragma space extern [] @tiny /* To force following variables into short addressing memory */ extern unsigned char Data_Buff [32] ; /* Buffer to store data */ /* Variables to differentiate the different SMBus transaction types */ extern volatile unsigned char SMBus_Mode ; extern volatile unsigned char SMB_Err_Status ; /* Error status */ /* Master to address slave with this address */ static volatile unsigned char PMBus_SlaveAdd = 0x80; /* Master to address slave with this address */ static volatile unsigned char PMBus_SlaveAdd = 0x80; /*----------------------------------------------------------------------------- ROUTINE NAME : Main INPUT : None OUTPUT : None DESCRIPTION : Using this file, user can write/ read PMBus commands. COMMENTS : Programs jumpts into this routine when microcontroller is reset -----------------------------------------------------------------------------*/ void main() { unsigned char temp ; SMBs_Address_t PMBus_Err ; /* To check errors in PMBus communication */ /*----------------------- Port A configuration ----------------------------*/ PADDR &= (unsigned char)~PORTA_DEFAULT; PADDR = PORTA_DEFAULT ; /* Other pins configured as floating input */ PAOR = (unsigned char)(PORTA_DEFAULT) ; /*----------------------- Port C configuration ----------------------------*/ PCDDR = CONTROL ; /* PC0 floating input, others push pull output */ |
|
Link URL |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |