Quantcast
Channel: Forums - Recent Threads
Viewing all 262198 articles
Browse latest View live

ADS1262: No convresion, /DRDY stay high

$
0
0

Part Number:ADS1262

Hello,

I'm trying to read some data, but I don't get anything.

First, I'm able to read and write the registers.
I'm using the ADS1262 on Bipolar mode (+2.5/-2.5), and at 2400SPS PGA:1.

But I don't get any data, even using the continuous mode or pulse mode with start pin or command.
When I send a read data command, I get the status 0x21, so no new data on ADC1 (bit 6), and then DOUT stay low.

The /DRDY stay high all the time, so I suppose that there is no conversion made and I don't get why.

What can be the cause ?

Thank You,

V.Kerbaul


ISO1212: DBQ package dimension missing

TMDSHVMTRPFCKIT: Voltage and current measurement.

$
0
0

Part Number:TMDSHVMTRPFCKIT

Hi all,

Could someone explain to me please the difference between the Vfb_U and Vsh_U measurements in the HVMotorCtrl+PFC-SCH[R1.1](Please visit the site to view this file)

Regards,

S.Tarik,

Linux/AM5728: AM57xx-EVM

$
0
0

Part Number:AM5728

Tool/software: Linux

I need to interface one barcode scanner with my AM572x-evm over USB. Barcode scanner support multiple configuration like UART, USB-HID & USB-VCP. 

Right now am using ti-processor-sdk-linux-am57xx-evm-05.01.00.11 . 

I tried to configure barcode scanner with different modes after connecting it with AM572x-EVM USB port. And its successfully configured.

On Virtual Port Config its shows on ttyACM0 , while in HID it showing usb-xhci-hcd.1 .

Can i know how to start communication with scanner  from AM572x-evm as a host. 

Linux/AM5728: McASP2 configuration questions

$
0
0

Part Number:AM5728

Tool/software: Linux

Hi,

I want to capture 8 mic data at a time so i am using McASP2 of Beagleboard X15 . I need help on these questions:-

1). how bitclk and Fsclk is configure at specific pin

2). If i want to record in minicom i am getting this error:-

arecord -f S16_LE  Mcasp2_1mic.wav -c 2 -r 96000                                                                           
Recording WAVE 'Mcasp2_1mic.wav' : Signed 16 bit Little Endian, Rate 96000 Hz, Stereo
[ 1463.776298] EXT4-fs error (device mmcblk0p2): ext4_mb_generate_buddy:757: group 2, block bitmap and bg descriptor inconsistent: 10370 vs 12418 frees
[ 1463.791240] EXT4-fs error (device mmcblk0p2): ext4_mb_generate_buddy:757: group 3, block bitmap and bg descriptor inconsistent: 7700 vs 20242 frees

3). i ahve done these configurations:-

 sound2: sound2 {
                compatible = "simple-audio-card";
                simple-audio-card,name = "PCM1681";
                simple-audio-card,format = "i2s";
                simple-audio-card,bitclock-master = <&sound2_master>;
                simple-audio-card,frame-master = <&sound2_master>;
                simple-audio-card,bitclock-inversion;

                simple-audio-card,cpu {
                        sound-dai = <&mcasp2>;
                };

                sound2_master: simple-audio-card,codec {
                        sound-dai = <&pcm1681>;
                        clocks = <&clkout2_clk>;
                        clock-names = "mclk";
                };
        };
};

&dra7_pmx_core {
        mcasp2_pins: mcasp2_pins {
                pinctrl-single,pins= <
                  /* sink must enable transmitter/receivers*/
                    0x2f4 (PIN_INPUT_PULLDOWN | MUX_MODE0)
                    0x2f8 (PIN_INPUT_PULLDOWN | MUX_MODE0)
                    0x304 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)
                    0x308 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)

                >;
};

&mcasp2 {
        #sound-dai-cells = <0>;
        pinctrl-names = "default";
        pinctrl-0 = <&mcasp2_pins>;
        //assigned-clocks = <&mcasp2_ahclkx_mux>;
        //assigned-clock-parents = <&sys_clkin2>;
        status = "okay";

        op-mode = <0>;  /* MCASP_IIS_MODE */
        tdm-slots = <2>;
        /* 16 serializers */
        serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
                2 2 2 2
                2 2 2 2
                0 0 0 0
                0 0 0 0
        >;
        tx-num-evt = <32>;
        rx-num-evt = <32>;
};

i have made changes in  am57xx-beagleboardx-15-common.dtsi file

if any other files need to be changed please let me know as i don't know about device driver .

Thanks,

Pooja

TPS61170: Power dissipation of the IC

$
0
0

Part Number:TPS61170

Hi,

I like to compute the power dissipation of TPS61170 to ensure the temperature rise . (MOSFET and current sense resistors are embedded into the device).

Could you please provide the formula and required data to compute. Iam using this device for boost converter.

Thanks,

Albin

ADS1115-Q1: Difference between ADS1115QDGSRQ1 and ADS1115BQDGSRQ1

$
0
0

Part Number:ADS1115-Q1

Dear TI Team,

Could you please give us the information, what is difference between the two mentioned part numbers? Many thanks in advance.

KR, Juergen Paessler.

LAUNCHXL-F280049C: User controller LED(Red one-GPIO23) doesn't work.

$
0
0

Part Number:LAUNCHXL-F280049C

Hello friends.

I am trying learn this launchpad but I even got problems with basics. The manual says GPIO23 and 34 are user controlled LED's but GPIO 23 doesn't work. I checked with multimeter the LED looks fine. I can use the GPIO34 without a problem. Here is my code.

void main(void)
{

    Device_init();
 
    //
    // Initialize GPIO and configure the GPIO pin as a push-pull output
    //
    Device_initGPIO();
    GPIO_setPadConfig(23, GPIO_PIN_TYPE_STD);
    GPIO_setDirectionMode(23, GPIO_DIR_MODE_OUT);
    GPIO_setPadConfig(34, GPIO_PIN_TYPE_STD);
    GPIO_setDirectionMode(34, GPIO_DIR_MODE_OUT);


    for(;;)
    {


        GPIO_togglePin(23);
        GPIO_togglePin(34);


    }
}


CCS/CCSTUDIO: CCS8 DSS error with Jython

$
0
0

Part Number:CCSTUDIO

Tool/software: Code Composer Studio

Hello, 

I'm trying to use DSS with jython but I encountered some problems.

I think I have everything setup as explained here http://software-dl.ti.com/ccs/esd/documents/users_guide/sdto_python_dss_scripting.html, but when I launch the example script listed in the linked page this is what I get:

traceSetFileLevel: ENTRY sLevel: ALL
traceSetFileLevel: RETURN
getServer: ENTRY sServerName: DebugServer.1
getServer: Getting definition for: DebugServer.1
getServer: Constructing server
getServer: RETURN com.ti.debug.engine.scripting.DebugServer@95ec0
setConfig: ENTRY sConfigurationFile: TMS320F280049C.ccxml
setConfig: RETURN
openSession: ENTRY sPattern: .*
start: ENTRY
start: Firing: onServerStarting()
start: Connecting to XPCOM DebugServer
SEVERE: Can not connect to DebugServer. null
stop: ENTRY
stop: RETURN
SEVERE: Could not start server: DebugServer.1: Can not connect to DebugServer. null
Traceback (most recent call last):
File "script.py", line 32, in <module>
debugSession = debugServer.openSession(".*")
at com.ti.debug.engine.scripting.DebugServer$SessionFactory.<init>(DebugServer.java:158)
at com.ti.debug.engine.scripting.DebugServer.openSession(DebugServer.java:1062)
at com.ti.debug.engine.scripting.DebugServer.openSession(DebugServer.java:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)

com.ti.ccstudio.scripting.environment.ScriptingException: com.ti.ccstudio.scripting.environment.ScriptingException: Could not start server: DebugServer.1: Can not connect to DebugServer. null

What am I missing? How can I debug what is happening?

Thanks in advance

Angelo

TPS3831: P2P Direct Replace

$
0
0

Part Number:TPS3831

Dear Team,

Do we have a solution can directly replace here:

STM811SW16F

BR

Kevin

TL3472: It breaks down when it's powered on

$
0
0

Part Number:TL3472

Dear all:

      We have used TL3472 op amp to make frequency converter products. At present, it is found that 5 boards are damaged when TL3472 is powered on.The circuit diagram is as follows.

Under normal circumstances, when S1 is 0V, the first leg of TL3472 is also 0V.But now we have 5 plates, S1 is 0V, TL3472 first leg 5 v.After replacing TL3472, the first pin output 0V is normal.

Please help me check whether there are any defects in my schematic diagram.Or can you give me some Suggestions for change

Thank you!

CCS/CC2640: Load SimpleBLEPeripheral into a ccsv9 Project

$
0
0

Part Number:CC2640

Tool/software: Code Composer Studio

How do I load SimpleBLEPeripheral into a ccsv9 project?

Before my PC crashed, I followed this procedure to load SimpleBLEPeripheral into my project:

In ccsv7, download and install (with default settings) TI BLE SDK v2.x
Click View > Resource Explorer Classic (aka TI Resource Explorer) and do the following:
 Enter search keyword: simple
 Find and expand SimpleBLEPeripheral
 Copy SimpleBLEPeripheralStack into project
 Copy SimpleBLEPeripheralApp into project

To restore my PC, I upgraded to 64 bit Windows 10 and installed ccsv9, but I can't follow my ccsv7 procedure.

First question: How do I access Resource Explorer Classic or equivalent in ccsv9?

Second question: How do I load SimpleBLEPeripheral into my project in ccsv9?

I am programming a CC2640F128, not R2.

TPS2041B: P2P Directly Replace

$
0
0

Part Number:TPS2041B

Dear Team,

Do we have a solution can directly replace this one?

AP2141DMPG-13

BR

Kevin

CCS/MSP430G2553: MSP430G2553

$
0
0

Part Number:MSP430G2553

Tool/software: Code Composer Studio

I generated 4 PWM (two pairs of complementary with deadtime) simultaneously in MSP430G2553 using interrupt as we have only two timers in this part.

The PWM is flickering when the duty is varied according to the value through ADC. Please help me to resolve the issue.

TPS3823: TPS3823-33 & TPS3823A-33

$
0
0

Part Number:TPS3823

Hi,

Could you please tell me what's the difference between TPS3823-33 and TPS3823A-33? I can NOT find the answer from the datasheet.

Thanks.

Kevin Xiong


CC2530: BDB stop commissioning procedure

$
0
0

Part Number:CC2530

Hello,

I am developing a router application on ZSTACK 3.0.1. Could anyone suggest me a way how to stop BDB commissioning procedure after starting it. So far I see that bdb commissioning procedure is automatically stopped after one cycle of network discovery scan is finished (primary + secondary channels). That is fine but I would like to stop it immediately after button is pressed and not to wait whole network discovery cycle to finish. So far I did not find such function in BDB API.

Best Regards

IWR6843ISK-ODS: the distance between antenna and object is not correct

$
0
0

Part Number:IWR6843ISK-ODS

Thanks for your supports.

We are working on IWR6843ISK-ODS EVM board.  the firmware is "ti\\mmwave_industrial_toolbox_3_3_1\labs\lab0025_ods_point_cloud_demo_68xx\prebuilt_binaries\ods_point_cloud_68xx.bin"

the configs is "\mmwave_industrial_toolbox_3_3_1\labs\lab0025_ods_point_cloud_demo_68xx\chirp_configsprofile_iwr6843_ods_3d.cfg"

according to "ods_point_cloud_demo_68xx_user_guide.pdf", Navigate to C:\ti\<mmwave_industrial_toolbox_install_dir>\labs\lab0016_zone_occ_14xx\gui\Click run_zone_occupancy.exe to run the visualizer

can get the x,y,z; we can cacluate the distance is sqrt(x*x+y*y+z*z), but the distance is not correct.

example, in fact, the distance is 2.55m; but the get data is about 2.05m (x=0,z=0,y=2.05m);

example,in fact, the distance is 1.9m; but the get data is about 1.7m ;

could you please help us how to debug this issue?

FDC2212: temperature stability

$
0
0

Part Number:FDC2212

Hello;

An analog switch is connected to calibrate temperature stability.

When switch is off, tank capacitor is measured (100pF %1). The capacitor value is known, so this step is used for temperature stability.

When switch is on Electrot capacitance is measured.

But some thing is wrong and when temperature change, Reading value become faulty.

Any suggestion please.

CCS/TMS320F28335: ADC reading and plotting graph problem

$
0
0

Part Number:TMS320F28335

Tool/software: Code Composer Studio

Dear Sir,

I would like to read the signal from ADCs. I have done the start of conversion using epwm1a, and want to display this data in the graph. But the problem is without connecting anything to DSP it is showing some random values. For the first channel, it is showing consistent values,  but for the second channel, it is showing sinusoidally varying data. Please tell me how to remove the offset which is varying sinusoidally or else is it the problem with ADC in my DSP. Please find the code attached. I want to use this data in timer interrupt there I want to give it to the hysteresis control. Please suggest me whether I am doing right or wrong.

//###########################################################################
//
// FILE:   Example_2833xAdcSoc.c
//
// TITLE:  ADC Start of Conversion Example
//
//! \addtogroup f2833x_example_list
//! <h1> ADC Start of Conversion (adc_soc)</h1>
//!
//! This ADC example uses ePWM1 to generate a periodic ADC SOC on SEQ1.
//! Two channels are converted, ADCINA3 and ADCINA2.
//!
//! \b Watch \b Variables \n
//! - Voltage1[10]	- Last 10 ADCRESULT0 values
//! - Voltage2[10]	- Last 10 ADCRESULT1 values
//! - ConversionCount	- Current result number 0-9
//! - LoopCount		- Idle loop counter
//
//###########################################################################
// $TI Release: F2833x Support Library v2.00.00.00 $
// $Release Date: Tue Jun 26 03:14:14 CDT 2018 $
// $Copyright:
// Copyright (C) 2009-2018 Texas Instruments Incorporated - http://www.ti.com/
//
// Redistribution and use in source and binary forms, with or without 
// modification, are permitted provided that the following conditions 
// are met:
// 
//   Redistributions of source code must retain the above copyright 
//   notice, this list of conditions and the following disclaimer.
// 
//   Redistributions in binary form must reproduce the above copyright
//   notice, this list of conditions and the following disclaimer in the 
//   documentation and/or other materials provided with the   
//   distribution.
// 
//   Neither the name of Texas Instruments Incorporated nor the names of
//   its contributors may be used to endorse or promote products derived
//   from this software without specific prior written permission.
// 
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################

//
// Included Files
//
#include "DSP28x_Project.h"     // Device Headerfile and Examples Include File
#include<IQmathLib.h>
#include<math.h>


//
// Function Prototypes
//
__interrupt void adc_isr(void);
__interrupt void cpu_timer0_isr(void);
void InitEPwm1Example(void);
void Gpio_setup1(void);


DCL_PI piVdc=PI_DEFAULTS;

float32_t PI=2.0f*3.141592f;
float32_t input1, sin_out1,input2, sin_out2;
long GlobalQ=GLOBAL_Q;
float32_t a1,b1,c1,a2,b2,c2;float theta=0.0f;//float deltheta=0.31415926f;
//float deltheta=(float)(1.8f*PI/180);
//float deltheta=0.031415f; \\for 10khz
float32_t deltheta=0.015707f;float32_t phase=0.0f;float32_t m=1.0f;
int prestate=0;int postate=0;int count=0;int v1[400];

int offset=1837;
float32_t dqgain=0.666667f;
float32_t ggain=0.5f;
float32_t Vm=12.0f;//Vmax 10 Volts
float32_t offtrim=1.4434f;
float32_t ft=0.0025f;//ft=(frequency)/(Switching frequency);
float32_t ramp;

float32_t vg,ig;
float32_t Iaref,VDref,VQref,VZref, VgD,VgQ,VgZ;
float32_t ukD,ukQ,ukZ,ukIg;
float32_t error1,error2,error3;
float32_t Vavg,Iavg;float32_t Vsum,Isum;
//
// Globals
//
Uint16 LoopCount;
Uint16 ConversionCount;float32_t Vdcact;
int VG[400],IG[400],Vdc[400];
float32_t igact,Vdcact;float32_t ILref;float32_t vsum=0.0f;float32_t vavg;
float32_t Vdcref=50.0f;float32_t eps;float32_t h1=0.1f,h2=0.1f;
float32_t a[400];Uint16 duty[400];int swap,swan,swbp,swbn;
int sw;

//
// Main
//
void main(void)
{
    //
    // Step 1. Initialize System Control:
    // PLL, WatchDog, enable Peripheral Clocks
    // This example function is found in the DSP2833x_SysCtrl.c file.
    //
    InitSysCtrl();

    EALLOW;
    #if (CPU_FRQ_150MHZ)     // Default - 150 MHz SYSCLKOUT
        //
        // HSPCLK = SYSCLKOUT/2*ADC_MODCLK2 = 150/(2*3)   = 25.0 MHz
        //
        #define ADC_MODCLK 0x5
    #endif
    #if (CPU_FRQ_100MHZ)
        //
        // HSPCLK = SYSCLKOUT/2*ADC_MODCLK2 = 100/(2*2)   = 25.0 MHz
        //
        #define ADC_MODCLK 0x2
    #endif
    EDIS;

    //
    // Define ADCCLK clock frequency ( less than or equal to 25 MHz )
    // Assuming InitSysCtrl() has set SYSCLKOUT to 150 MHz
    //
    EALLOW;
    SysCtrlRegs.HISPCP.all = ADC_MODCLK;
    EDIS;

    //
    // Step 2. Initialize GPIO:
    // This example function is found in the DSP2833x_Gpio.c file and
    // illustrates how to set the GPIO to it's default state.
    //
    // InitGpio();  // Skipped for this example

    //
    // Step 3. Clear all interrupts and initialize PIE vector table:
    // Disable CPU interrupts
    //
    DINT;

    //
    // Initialize the PIE control registers to their default state.
    // The default state is all PIE interrupts disabled and flags
    // are cleared.
    // This function is found in the DSP2833x_PieCtrl.c file.
    //
    InitPieCtrl();

    //
    // Disable CPU interrupts and clear all CPU interrupt flags:
    //
    IER = 0x0000;
    IFR = 0x0000;

    //
    // Initialize the PIE vector table with pointers to the shell Interrupt
    // Service Routines (ISR).
    // This will populate the entire table, even if the interrupt
    // is not used in this example.  This is useful for debug purposes.
    // The shell ISR routines are found in DSP2833x_DefaultIsr.c.
    // This function is found in DSP2833x_PieVect.c.
    //
    InitPieVectTable();

    //
    // Interrupts that are used in this example are re-mapped to
    // ISR functions found within this file.
    //
    EALLOW;  // This is needed to write to EALLOW protected register
    PieVectTable.ADCINT = &adc_isr;
    PieVectTable.TINT0 = &cpu_timer0_isr;
    EDIS;    // This is needed to disable write to EALLOW protected registers
    InitCpuTimers();   // For this example, only initialize the Cpu Timers
    #if (CPU_FRQ_150MHZ)
        //
        // Configure CPU-Timer 0 to interrupt every 500 milliseconds:
        // 150MHz CPU Freq, 50 millisecond Period (in uSeconds)
        //
        ConfigCpuTimer(&CpuTimer0, 150, 50);
    #endif
    #if (CPU_FRQ_100MHZ)
        //
        // Configure CPU-Timer 0 to interrupt every 500 milliseconds:
        // 100MHz CPU Freq, 50 millisecond Period (in uSeconds)
        //
        ConfigCpuTimer(&CpuTimer0, 100, 500000);
    #endif
        CpuTimer0Regs.TCR.all = 0x4000;
    //
    // Step 4. Initialize all the Device Peripherals:
    // This function is found in DSP2833x_InitPeripherals.c
    //
    // InitPeripherals(); // Not required for this example
    InitAdc();  // For this example, init the ADC
    Gpio_setup1();
    InitEPwm1Example();



    //
    // Step 5. User specific code, enable interrupts:
    //

    //
    // Enable ADCINT in PIE
    //
    PieCtrlRegs.PIEIER1.bit.INTx6 = 1;
    PieCtrlRegs.PIEIER1.bit.INTx7 = 1;
    IER |= M_INT1;      // Enable CPU Interrupt 1
    EINT;               // Enable Global interrupt INTM
    ERTM;               // Enable Global realtime interrupt DBGM
    LoopCount = 0;
    ConversionCount = 0;

    //
    // Configure ADC
    //
    AdcRegs.ADCMAXCONV.all = 0x0002;       // Setup 2 conv's on SEQ1
    AdcRegs.ADCCHSELSEQ1.bit.CONV00 = 0x2; // Setup ADCINA3 as 1st SEQ1 conv.
    AdcRegs.ADCCHSELSEQ1.bit.CONV01 = 0x3; // Setup ADCINA2 as 2nd SEQ1 conv.
    AdcRegs.ADCCHSELSEQ1.bit.CONV02 = 0x1;
    //
    // Enable SOCA from ePWM to start SEQ1
    //
    AdcRegs.ADCTRL2.bit.EPWM_SOCA_SEQ1 = 1;
    
    AdcRegs.ADCTRL2.bit.INT_ENA_SEQ1 = 1;  // Enable SEQ1 interrupt (every EOS)

    for(;;)
    {
        LoopCount++;
    }
}

//
// adc_isr - 
//
__interrupt void adc_isr(void)
{
    VG[ConversionCount] = (AdcRegs.ADCRESULT0 >>4);
    //VG[ConversionCount] = (AdcRegs.ADCRESULT1 >>4);
    IG[ConversionCount]=(AdcRegs.ADCRESULT1 >>4);
    a[ConversionCount]=(float32_t)(VG[ConversionCount]*0.000732600f);
    //Vdcact=(float)(((float)(Vdc[ConversionCount])*(0.000732600f))-1.5093f)*169.0f;
    igact=(float32_t)(IG[ConversionCount]*(0.000732600f));
    vsum=vsum+a[ConversionCount];
    if(ConversionCount == 400)
    {
        ConversionCount = 0;
        vavg=vsum*0.0025f;
        vsum=0.0f;
    }
    else
    {
        ConversionCount++;
    }

    //
    // Reinitialize for next ADC sequence
    //
    AdcRegs.ADCTRL2.bit.RST_SEQ1 = 1;         // Reset SEQ1
    AdcRegs.ADCST.bit.INT_SEQ1_CLR = 1;       // Clear INT SEQ1 bit
    PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;   // Acknowledge interrupt to PIE

    return;
}

__interrupt void cpu_timer0_isr(void)
{
    CpuTimer0.InterruptCount++;
    postate=GpioDataRegs.GPADAT.bit.GPIO24;

    if (postate>prestate){
        theta=0.0f;
        GpioDataRegs.GPATOGGLE.bit.GPIO30 = 1;
        }
    prestate=postate;
    ramp=count*ft;
    theta=ramp*PI;

    eps=(float32_t)(m*a[ConversionCount]-igact);

    if (eps>=h1){
        swap=1;swan=0;
        swbp=0;swbn=1;
    }

    else if(eps<-h2){
        swap=0;swan=1;
        swbp=1;swbn=0;
    }

    GpioDataRegs.GPADAT.bit.GPIO11=swap;
    GpioDataRegs.GPADAT.bit.GPIO12=swan;
    GpioDataRegs.GPADAT.bit.GPIO13=swbp;
    GpioDataRegs.GPADAT.bit.GPIO14=swbn;

//    sw=8*swbn+4*swbp+2*swan+1*swap;
  //  GpioDataRegs.GPBDAT.all=sw;
    count=count+1;
    theta=theta+deltheta;
    if (count==400){
        count=0;
        }

    //
    // Acknowledge this interrupt to receive more interrupts from group 1
    //
    PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;
}


void Gpio_setup1(void){
    EALLOW;
    GpioCtrlRegs.GPAPUD.bit.GPIO0 = 0;   // Enable pullup on GPIO0
    GpioCtrlRegs.GPAPUD.bit.GPIO1 = 0;   // Enable pullup on GPIO1
    GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1;  // GPIO0 = PWM1A
    GpioCtrlRegs.GPAMUX1.bit.GPIO1 = 1;  // GPIO1 = PWM1B

    GpioCtrlRegs.GPADIR.bit.GPIO24=0;    // For synchronous pulse read
    GpioCtrlRegs.GPAMUX2.bit.GPIO24=0;
    GpioCtrlRegs.GPAPUD.bit.GPIO24=0;
    GpioCtrlRegs.GPAQSEL2.bit.GPIO24=0;

    GpioCtrlRegs.GPAMUX1.bit.GPIO11=0;
    GpioCtrlRegs.GPADIR.bit.GPIO11=1;
    GpioDataRegs.GPADAT.bit.GPIO11=0;

    GpioCtrlRegs.GPAMUX1.bit.GPIO12=0;
    GpioCtrlRegs.GPADIR.bit.GPIO12=1;
    GpioDataRegs.GPADAT.bit.GPIO12=0;

    GpioCtrlRegs.GPAMUX1.bit.GPIO13=0;
    GpioCtrlRegs.GPADIR.bit.GPIO13=1;
    GpioDataRegs.GPADAT.bit.GPIO13=0;

    GpioCtrlRegs.GPAMUX1.bit.GPIO14=0;
    GpioCtrlRegs.GPADIR.bit.GPIO14=1;
    GpioDataRegs.GPADAT.bit.GPIO14=0;

    GpioCtrlRegs.GPAMUX2.bit.GPIO30=0;// C group pin for zero crossing detection
    GpioCtrlRegs.GPADIR.bit.GPIO30=0;
    EDIS;
}

void InitEPwm1Example(void)
{
    //
    // Setup TBCLK
    //
    //EPWM1 A and B are GPIO 0 and 1
    EPwm1Regs.TBCTL.bit.CTRMODE = 2; // Count up down
    EPwm1Regs.TBPRD = 1875;       // Set timer period
    EPwm1Regs.TBCTL.bit.PHSEN = TB_DISABLE;    // Disable phase loading
    EPwm1Regs.TBPHS.half.TBPHS = 0x0000;       // Phase is 0
    EPwm1Regs.TBCTR = 0x0000;                  // Clear counter
    EPwm1Regs.TBCTL.bit.HSPCLKDIV = 001;   // Clock ratio to SYSCLKOUT
    EPwm1Regs.TBCTL.bit.CLKDIV = 000;
    EPwm1Regs.TBCTL.bit.SYNCOSEL=1;
    EPwm1Regs.CMPA.half.CMPA =937;    // Set compare A value
    EPwm1Regs.CMPB = 937;              // Set Compare B value
    EPwm1Regs.DBCTL.bit.OUT_MODE=3;
    EPwm1Regs.DBCTL.bit.POLSEL=2;
    EPwm1Regs.DBCTL.bit.IN_MODE=0;
    EPwm1Regs.DBRED=20;
    EPwm1Regs.DBFED=20;
    EPwm1Regs.AQCTLA.bit.CAU=2;    // Set PWM1A on Zero
    EPwm1Regs.AQCTLA.bit.CAD=1;
    EPwm1Regs.AQCTLB.bit.CBU=2;
    EPwm1Regs.AQCTLB.bit.CBD=1;
    EPwm1Regs.ETSEL.bit.SOCAEN = 1;     // Enable SOC on A group
    EPwm1Regs.ETSEL.bit.SOCASEL = 4;    // Select SOC from from CPMA on upcount
    EPwm1Regs.ETPS.bit.SOCAPRD = 1;     // Generate pulse on 1st event

}

//
// End of File
//

 

LM317A: Using ceramic capacitor of LM317A

$
0
0

Part Number:LM317A

Hi

I got a question about LM317A from my customer.
If I use ceramic capacitor with LM317A, could I use it with using resister in series?

Best regards,
Yokota
Viewing all 262198 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>