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

SN74HC646: DIP Active Version?

$
0
0

Part Number: SN74HC646

Are there any of the 74HC646/647/648/649 logic type that are available in a DIP option? Note the logic family (i.e. 74HC, 74LVC, 74AHC, etc. )doesn't matter for my project and what I am basically looking for is the bidirectional latch or flip flop  with tristate outputs available in a DIP format and having at least 8 bits  width.  If necessary I could make do with the 74HC646 and SMT to DIP adapters but I would much rather simply have a DIP IC.  

Thanks for any help.  


SM72445: detail for mppt way of sm72445

$
0
0

Part Number: SM72445

Hello,

I bought the board which didn't mark the designator of material on the panel.

I found some datasheet about designator. However it was unclear and inconvenient grossly.

Sorry to bother you, but could you send me dxp or pcb document for comparing.

Ohhh, additionally, I sticked to test setup that load in current mode(CC) and waited for two minutes. Then, after I see a little variation, it wasn't at maximum power point yet.

What I saw is It always operates at BOOST mode, and could I change it to BUCK mode? (when it wasn't at PM mode)

I would appreciate your help.

CCS/SIMPLELINK-CC13X2-26X2-SDK: Sensor project does not build

$
0
0

Part Number: SIMPLELINK-CC13X2-26X2-SDK

Tool/software: Code Composer Studio

SDK simplelink v3.30.00

I just imported the project and Ctrl+b it.

That's what I get:

If I try to open the sensor.syscfg I get this:

CC3200: Unable to make Smart config work.

$
0
0

Part Number: CC3200

Hello,

I am unable to make the smart config work using the following:

------------------------------------------------------------------------------------

Hardware : cc3200-LAUNCHXL(Rev 4.1)

Tools: Code composer studio 9.2 running in Ubuntu 18.04.3 LTS

Software: CC3200 SDK Version 1.4.0 - Project - "provisioning_smartconfig"

Andriod app - Simple link starter pro -Build 2.2.257 SC lib 1.0.2

"Enable Smart config" is "ON"

Wifi router : Asus with 2.5 GHz enabled only.

--------------------------------------------------------------------------------------------------------------

When in debug mode, the device is stuck at "sl_WlanSmartConfigStart" and also when provisioning is done, the app cannot detect any devices nor does the RED led is "ON"

Regards,

Sam

TLC393: TINA

$
0
0

Part Number: TLC393

TINA TI. How do I insert the second half of a dual comparator like the TLC393. The first time I insert the part it shows it as the first half  (pins 1, 2,3 ,4 and 8). How do I insert the second half (pins 5, 6, and 7). Inserting the TLC393 will add a completely new part, which means that the device current will double because I now have two comparators instead of just one dual comparator.. I am using Tina Version 9.3.150.4 SF-TI.

TMS320F28235: Not desired delay on Trip Zone restart in Boost application as Cycle by Cycle Current limit protection with TMS320F28235

$
0
0

Part Number: TMS320F28235

Hi, we are realizing the control of a Phase Shifted inverter supplied by a Bilevel Boost PFC unit  where the two controls are managed simultaneously by a DSP type TMS320F28235. The problem we found is related to the Boost control. In particular we want to implement a Cycle by Cycle current control in order to limit the current absorbed by the line and keep it at a constant value established by a comparator placed on the reading of the circulating current on the Boost inductance. To do this, the comparator output has been connected to a TZ pin so that the Boost control stop occurs in Hardware mode. The software has been configured so that once the TZFLG is monitored and given its intervention, we  wait for the status reading of the same pin to say that  the current is returned below the intervention threshold level. At this point the software will do the TZCLEAR in order to allow the Boost command to restart. The controls of the pin status of the current signal and the restart of the TZ are made within the Boost interrupt with a frequency of 50 kHz. What is expected is that the restart of the boost is immediate so that there is no discontinuity on the control: in practice what is obtained is that the command of the Boost remains blocked for about 750useconds before restarting with an impulse that retries the trigger of the current comparator and the subsequent block by the TZ (the sequence is always repeated in the same way). We have had the opportunity to try a similar protection also on the control of the inverter and the result is always to have this delay of about 750useconds on the restart of the power controls.
For information the CBC TZ was used but also the One Shot was tested with the same result. We wanted to know if there is something wrong with our use of the TZ function or otherwise we want to have have advices on how to implement the Current Limt Cycle by Cycle function correctly.

CC1310: SmartRF Flash Programmer 2 - Clock Control

$
0
0

Part Number: CC1310

Hello. 

I am using a custom gang programming fixture, and I need to slow the clock speed down (TCLK). In CCS, I can modify the ccxml file to control the clock (verified with scope), but I need to use SmartRF Flash Programmer 2, which offers no clock control. I found the thread below and tried modifying the XDS110c2.dat file, but it does not appear to have any affect. I verified that I am modifying the correct file because if I remove or rename the file, the flash tool fails altogether. But changing the frequency reference doesn't seem to have any affect (looking at the clock pin on an oscilloscope).

https://e2e.ti.com/support/wireless-connectivity/bluetooth/f/538/t/717965?CC2640-SmartRF-Flash-Programmer-2-and-XDS200-programmer-Clock-Control

Thanks in advance!

DRV8320: IDRIVE configuration by HW

$
0
0

Part Number: DRV8320

Hi
 
Please let me make sure IDRIVE configuration by external resister.

We understand that the resister variation is specified on the datasheet but if the resister value was out of the value specified datasheet, how does DRV8320 work ?

Please let me make sure IDRIVE configuration by external resister.We understand that the resister variation is specified on the datasheet but if the resister value was out from the value specified by datasheet, how does IDRIVE work ?


MSP430FR2433: UART Expander

$
0
0

Part Number: MSP430FR2433

Hi

 

Do you have sample code of UART expander by SPI or I2C ?

 

Thank you and best regards,

Michiaki

PGA460-Q1: PGA460 + CC2640

$
0
0

Part Number: PGA460-Q1

I'm try to design remote sensor with PGA460 and BLE interface. Can i use IOREG output of PGA460 for powering CC2640? I'm found that PGA460 IOREG have 50ma current limit and CC2640 have ~20ma (CPU + AIR) current demand.

I'm surprised that TI have not reference desing for wireless ultrasonic sensor with great CC2xxxx lineup.

Fault pin always active and a lot of current consumption

$
0
0

Part Number: TPA3221

Hello,

I'm developing a portable audio speaker and I want to use the TPA3221,but at this time, I can't make it work.

I designed a test board and this is what I noticed in my tests :

- Nothing on the outputs, little crackling when a speaker is connected

- When the reset is low, otw_clip and fault are off (5V by pull-up)

- When I put reset to high state, fault led goes on

- Current consumption never above 100mA

- The 5V internal LDO stays at around 4V with peaks to 4.5V but it never reaches 5V.

I tried to use an external supply (basic LM340T5) to power the VDD, AVDD and GVDD instead of the internal LDO, but nothing changed.

So, I decided to replace the TPA3221 IC. Here is the result :

- Nothing on outputs

- Fault LED always on, even if the reset is low

- Current consumption around 250mA (strange thing... )

This is my current schematic :

Do you think my board has damaged the TPA3221 ?

Inductors are SRN1060-100M from Bourns.

C9, C21, C4, C12, C17 and C24 are the same as on the EVM board (PHE426HB7100JR06 and EEU-FC1H102).

I can send you the schematic and the PCB in altium format if you prefer.

I have an other question about the filters behind the TPA3221. What are the filters formed by C5, C6, C13, C14, R4 and R6 for ? I only see them in the datasheet but nobody uses it.

Thank you in advance for you help and sorry for my english :-)

Best regards,

Bastian Cerf

Compiler/CC2640R2F: SPI communication issue

$
0
0

Part Number: CC2640R2F

Tool/software: TI C/C++ Compiler

Hello, 

I am facing a problem with spi communication between two microcontrollers. i.e TI microcontroller and Cypress, where cypress is master, TI is slave, I see a reset issue which does not occur always.

SPI payload data is 13 bytes long.  When the data is sent from master to slave,data sent from master to slave is not as expected, and during that time there is a reset. I have checked that baud rate, it is same on both the sides. 

SPI is  4-wired. MISO, MOSI,CLK,. Chip Select (low active). 

Please provide solution to the above problem.

Thanks in advance.

AFE4420: Technical documentation wanted

$
0
0

Part Number: AFE4420

Hi TI,

I want to use AFE4420 as a front end controller in a design for a client. There must be more data available than the only 11 pages data sheet one can find at your website.

I miss typical application schematic, detailed circuit description, I2C register description and similar documentation.

Is the chip brand new and thus not ready yet?

Looking forward to hear from you soon.

Br,

Johnny Westergaard

R&D Consult

Denmark

CCS/LAUNCHXL2-RM57L: HalCoGen v4.7.1 - FREERTOS/CCS v9.1 [E0002] Instruction requires VFP or NEON Support

$
0
0

Part Number: LAUNCHXL2-RM57L

Tool/software: Code Composer Studio

I am trying to reproduce the FreeRTOS project described here, but with a RM57L.

Hercules TMS570LC43 RTOS project - LED Blinky with two Tasks
https://e2e.ti.com/support/archive/launchyourdesign/m/boosterpackcontest/666075

I generated code using HalCoGen. Then I  import the code into CCS v9.1, and set the Project Properties as:

General->Advanced->Device Endianess: little

Runtime support library: <automatic>

Then I build the project (Project > Build Project) and get the above error in Resources

os_portasm.asm and HL_sys_core.asm

See like floating point (FP)  instructions are generated by HalCoGen (example:        fmdrr d0,         r1,     r1)

Q1 - If I need FP support, what Runtime support library should I use?

Q2 - If I do not need FP support, how can I resolve this issue?

LM2611: LM2611

$
0
0

Part Number: LM2611

Hello, I would like to make power supply with input voltage +5v and output voltage -12v ( 260mA). Can you help me with the circuit?

Thanks!


TPS92611-Q1: TINA TI - SPICE MODEL

$
0
0

Part Number: TPS92611-Q1

I'm interested in obtain the TPS92611-Q1 to make a led driver.

Is it necessary to have a NDA to use the simulation files on Tina? How can I get it if I'm in another country?

ADS1292ECG-FE: Not getting the same lead on both channels of ADS1292

$
0
0

Part Number: ADS1292ECG-FE

Hi,

I have physically reconfigured the input channels of the ADS1292 dev kit to get the same lead output on both channels. Following is my current configuration,

IN1P and IN2P are short within the board and are connected to the Left Leg
IN1N is connected to the right arm
IN2N is connected to the right arm as well (can be connected elsewhere on the body but it's connected on the right arm for the sake of getting same signals on both channels)
RLDOUT is connected to the left arm

With this configuration, I expected to get a Lead II ECG on both channels. However, I only get a Lead II on channel 1 and its a totally different lead on channel 2 (i am guessing lead I). 

What am I doing wrong here? Is it fixable with the same physical channel configuration that i described earlier?

Thanks in advance!

Mubin

CCS/MSP432P401R: TCS34725 Color Sensor (I2C Code does not process any communication with the device)

$
0
0

Part Number: MSP432P401R

Tool/software: Code Composer Studio

Hi, I am new to coding in CCS and using the MSP432p401r. For my final project, I need to interface the TCS34725 color sensor with the MSP432p401r microcontroller. For some reason, my code, which follows an example already posted, does not initialize the I2C or read any values from the sensor. I have posted my code below for you to view. Any help will be appreciated, I'm honestly so lost on how to proceed on this!! PS (Ignore the commented sections, some of that was from previous code I had written but did not work). Thank you so much in advance!

#include "msp.h"
#include "driverlib.h"
#include "stdio.h"
/**
 * main.c
 */
//#define MEAS_DELAY 200000;
//#define TEMP_TIMEOUT 1000;
//
//#define TEMP_REG_ADDRESS 0X16;
//#define SLAVE_ADDRESS 0X29;
//// #define SENSOR_ADDRESS 0X52; //this is after the bit is shifted one to the left
//#define CONFIG_REG_ADDRESS 0X0D;
//#define CONFIG_ACTIVATE 0X03;
//#define CONFIG_DEACTIVATE 0X00;
//#define CONFIG_REG_SIZE 1;
//
//const eUSCI_I2C_MasterConfig i2cConfig = {
//     EUSCI_B_I2C_CLOCKSOURCE_SMCLK,
//     3000000,
//     EUSCI_B_I2C_SET_DATA_RATE_400KBPS,
//     0,
//     EUSCI_B_I2C_NO_AUTO_STOP
//    };
//
//void main(void)
//{
// WDT_A->CTL = WDT_A_CTL_PW | WDT_A_CTL_HOLD;  // stop watchdog timer
//
// MAP_CS_setDCOFrequency(3E+6);
// MAP_CS_initClockSignal(CS_SMCLK,CS_DCOCLK_SELECT,CS_CLOCK_DIVIDER_1);
// // initialize I2C
// initI2C();
//
// // set read functionality for I2C
// colReadReg(0X29, 0X17, 0X16, 0X19, 0X18, 0X1B, 0X1A, 0, 0, 0);
//
//}
//
//
//void initI2C(void){
//    // sets the GPIO pin corresponding to SCL on the sensor as an output
//        MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P6, GPIO_PIN5, GPIO_PRIMARY_MODULE_FUNCTION);
//        // sets the GPIO pin corresponding to SDA on the sensor as an output
//        MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P6, GPIO_PIN4, GPIO_PRIMARY_MODULE_FUNCTION);
//        // initializes the I2C Master to SMCLK at 400kbps with no autostop
//        MAP_I2C_initMaster(EUSCI_B0_BASE, &i2cConfig);
//        // set Master in receive mode
//        MAP_I2C_setMode(EUSCI_B0_BASE, EUSCI_B_I2C_RECEIVE_MODE);
//        // enable I2C Module to start operations
//        MAP_I2C_enableModule(EUSCI_B0_BASE);
//        printf("I've finished initializing the I2C.");
//}
//
//int colReadReg(uint8_t device_add, uint8_t reg_red_high, uint8_t reg_red_low, uint8_t reg_green_high, uint8_t reg_green_low, uint8_t reg_blue_high, uint8_t reg_blue_low, uint16_t *value1,  uint16_t *value2, uint16_t *value3){
//    // in our case, we have three results (red, green, blue values) and 6 different registers (high/low byte registers) that we need to read/write from
//    int result1_high = false; // result from red register storing high byte
//    int result1_low = false; // result from red register storing low byte
//    int result2_high = false; // result from green register storing high byte
//    int result2_low = false; // result from green register storing low byte
//    int result3_high = false; // result from blue register storing high byte
//    int result3_low = false; // result from blue register storing low byte
//    printf("I set all of the result variables.");
//    uint8_t red_high = 0; // we are sending one byte of data corresponding to the red high byte storing register over to the I2C
//    uint8_t red_low = 0; // we are sending one byte of data corresponding to the red low byte storing register over to the I2C
//    uint8_t green_high = 0; // we are sending one byte of data corresponding to the green high byte storing register over to the I2C
//    uint8_t green_low = 0; // we are sending one byte of data corresponding to the green low byte storing register over to the I2C
//    uint8_t blue_high = 0; // we are sending one byte of data corresponding to the blue high byte storing register over to the I2C
//    uint8_t blue_low = 0; // we are sending one byte of data corresponding to the blue low byte storing register over to the I2C
//    printf("I set all of the byte variables.");
//    int i = 0;
//    // sets the I2C address of the device we wish to talk to
//    MAP_I2C_setSlaveAddress(EUSCI_B0_BASE,device_add);
//    // set write mode to initially write to the sensor with the three different registers
//    MAP_I2C_setMode(EUSCI_B0_BASE,EUSCI_B_I2C_TRANSMIT_MODE);
//    // write START + address + register to the sensor (for each register)
//
//    // red register (high)
//    result1_high = MAP_I2C_masterSendSingleByteWithTimeout(EUSCI_B0_BASE, reg_red_high, );
//    if (result1_high == false){
//        printf("The result1_high variable value is: ", result1_high);
//    }
//    // Continue only if the write was successful
//    if (result1_high == true){
//        printf("I've entered the result1_high if condition.");
//        // set read mode
//        MAP_I2C_setMode(EUSCI_B0_BASE, EUSCI_B_I2C_RECEIVE_MODE);
//
//        // Restart
//        MAP_I2C_masterReceiveStart(EUSCI_B0_BASE);
//
//        // Read a single byte of data from the red register (high) of the sensor and stop
//        red_high = MAP_I2C_masterReceiveSingle(EUSCI_B0_BASE);
//
////        // Parse the red register (high) data
////        *value1_high = (uint16_t)(red_high[0]);
//     }
//
//     // red register (low)
//     result1_low = MAP_I2C_masterSendSingleByteWithTimeout(EUSCI_B0_BASE, reg_red_low, 5);
//
//     // Continue only if the write was successful
//     if (result1_low == true){
//         // set read mode
//         MAP_I2C_setMode(EUSCI_B0_BASE, EUSCI_B_I2C_RECEIVE_MODE);
//
//         // Restart
//         MAP_I2C_masterReceiveStart(EUSCI_B0_BASE);
//
//         // Read a single byte of data from the red register (low) of the sensor and stop
//         red_low = MAP_I2C_masterReceiveSingle(EUSCI_B0_BASE);
//
//         // Parse the red register data (high and low bytes together)
//         *value1 = (uint16_t)(red_high << 8 | red_low);
//      }
//
//     // green register (high)
//     result2_high = MAP_I2C_masterSendSingleByteWithTimeout(EUSCI_B0_BASE, reg_green_high, 5);
//
//     // Continue only if the write was successful
//     if (result2_high == true){
//        // set read mode
//        MAP_I2C_setMode(EUSCI_B0_BASE, EUSCI_B_I2C_RECEIVE_MODE);
//
//        // Restart
//        MAP_I2C_masterReceiveStart(EUSCI_B0_BASE);
//
//        // Read a single byte of data from the green register (high) of the sensor and stop
//        green_high = MAP_I2C_masterReceiveSingle(EUSCI_B0_BASE);
//
////        // Parse the red register data
////        *value2_high = (uint16_t)(green_high[0]);
//    }
//
//     // green register (low)
//     result2_low = MAP_I2C_masterSendSingleByteWithTimeout(EUSCI_B0_BASE, reg_green_low, 5);
//
//     // Continue only if the write was successful
//     if (result2_low == true){
//
//     // set read mode
//        MAP_I2C_setMode(EUSCI_B0_BASE, EUSCI_B_I2C_RECEIVE_MODE);
//
//     // Restart
//        MAP_I2C_masterReceiveStart(EUSCI_B0_BASE);
//
//     // Read a single byte of data from the green register (high) of the sensor and stop
//        green_low = MAP_I2C_masterReceiveSingle(EUSCI_B0_BASE);
//
//     // Parse the green register data (high and low bytes together)
//        *value2 = (uint16_t)(green_high << 8 | green_low);
//         }
//
//     // blue register (high)
//     result3_high = MAP_I2C_masterSendSingleByteWithTimeout(EUSCI_B0_BASE, reg_blue_high, 5);
//
//     // Continue only if the write was successful
//     if (result3_high == true){
//
//     // set read mode
//        MAP_I2C_setMode(EUSCI_B0_BASE, EUSCI_B_I2C_RECEIVE_MODE);
//
//     // Restart
//        MAP_I2C_masterReceiveStart(EUSCI_B0_BASE);
//
//     // Read a single byte of data from the green register (high) of the sensor and stop
//        blue_high = MAP_I2C_masterReceiveSingle(EUSCI_B0_BASE);
//
////     // Parse the red register data
////        *value3_high = (uint16_t)(blue_high[0]);
//        }
//
//     // blue register (low)
//     result3_low = MAP_I2C_masterSendSingleByteWithTimeout(EUSCI_B0_BASE, reg_blue_low, 5);
//
//     // Continue only if the write was successful
//     if (result3_low == true){
//
//     // set read mode
//         MAP_I2C_setMode(EUSCI_B0_BASE, EUSCI_B_I2C_RECEIVE_MODE);
//
//     // Restart
//         MAP_I2C_masterReceiveStart(EUSCI_B0_BASE);
//
//     // Read a single byte of data from the green register (high) of the sensor and stop
//         blue_low = MAP_I2C_masterReceiveSingle(EUSCI_B0_BASE);
//
//     // Parse the blue register data (high and low bytes together)
//         *value3 = (uint16_t)(blue_high << 8 | blue_low);
//        }
//
//     return result1_high, result1_low, result2_high, result2_low, result3_high, result3_low;
//    }
//
//
#define MEAS_DELAY 200000 // delay between temp measurements
#define TEMP_TIMEOUT 1000 // timeout in ms for I2C calls
// For TCS34725
#define RED_REG_ADDR_LOW 0x16
#define CLEAR_REG_ADDR_LOW 0x14
#define GREEN_REG_ADDR_LOW 0x18
#define BLUE_REG_ADDR_LOW 0x1A
#define SLAVE_ADDR 0x29
#define ID_REG_ADDR 0x92
//#define CONFIG_REG_ADDR 0x0D
#define ENABLE_REG_ADDR 0x80
//#define CONTROL_REG_ADDR 0x8F
//#define RGBC_TIMING_REG_ADDR 0x81
//#define GAIN_1 0x00
//#define TIMING 0x00
//#define ID_REG_ADDR 0x92
#define CONFIG_ACTIVATE 0x03
#define CONFIG_DEACTIVATE 0x00
#define CONFIG_REG_SIZE 1
/* Byte swap of 16-bit register value */
// These macros swap the high and low bytes of 16-bit argument v
#define HI_UINT16(a) (((a) >> 8) & 0xFF)
#define LO_UINT16(a) ((a) & 0xFF)
#define SWAP(v) ( (LO_UINT16(v) << 8) | HI_UINT16(v) )
int configRegWrite(uint8_t ui8Addr, uint8_t ui8Reg, uint8_t *Data, uint8_t ui8ByteCount) ;
int tempReadReg (uint8_t address, uint8_t reg, uint16_t *value) ;
void initializeI2C(void) ;
/* I2C Master Configuration Struct */
volatile eUSCI_I2C_MasterConfig i2cConfig =
{
EUSCI_B_I2C_CLOCKSOURCE_SMCLK, // SMCLK Clock Source
3000000, // Use clock of 3MHz
EUSCI_B_I2C_SET_DATA_RATE_400KBPS, // Desired I2C Clock of 400khz
0, // No byte counter threshold
EUSCI_B_I2C_NO_AUTO_STOP
};
void main(void)
{
uint8_t red = 0, clear = 0, green = 0, blue = 0 ;
uint8_t id_correct = 0;
float tObjAmb, tObjTemp ;
int success = 0 ;
int id_success = 0;
int i = 0 ;
//Stop watchdog timer
MAP_WDT_A_holdTimer();
//Disabling interrupts
MAP_Interrupt_disableMaster();
// This is so that LED blinks every time we take a measurement
// initialize P1.0 and make it output (P1.0 built-in LED1)
GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P1, GPIO_PIN0,GPIO_PRIMARY_MODULE_FUNCTION);
GPIO_setAsOutputPin(GPIO_PORT_P1, GPIO_PIN0);
GPIO_setOutputLowOnPin(GPIO_PORT_P1, GPIO_PIN0);
/* Initialize i2c */
initializeI2C();
/* Initialize temperature sensor */
uint16_t writeVal = CONFIG_ACTIVATE ;
//uint16_t writeVal2 = GAIN_1;
//uint16_t writeVal3 = TIMING;
// writeVal = SWAP(writeVal);
configRegWrite(SLAVE_ADDR, ENABLE_REG_ADDR, (uint8_t*)&writeVal, CONFIG_REG_SIZE);
//configRegWrite(SLAVE_ADDR, CONTROL_REG_ADDR, (uint8_t)*&writeVal2, CONFIG_REG_SIZE);
//configRegWrite(SLAVE_ADDR, RGBC_TIMING_REG_ADDR,(uint8_t)*&writeVal3, CONFIG_REG_SIZE);
//SYSTEM CLOCK SETUP
// Set DCO clock source frequency
MAP_CS_setDCOFrequency(3E+6);
// Tie SMCLK to DC
MAP_CS_initClockSignal(CS_SMCLK, CS_DCOCLK_SELECT, CS_CLOCK_DIVIDER_1);
while(1)
{
// Delay between conversions
for(i = 0; i < MEAS_DELAY; i++){}
// Read temp
MAP_Interrupt_disableMaster();
// read the ID register to check if the value from it was 0x44, this means we are successfully communicating with the device
//id_success = tempReadReg(SLAVE_ADDR, ID_REG_ADDR, &id_correct);
//if (id_correct == 0x44)
//{
//printf("ID read successfully");
//}
// first read the low byte
red = tempReadReg(SLAVE_ADDR,RED_REG_ADDR_LOW,&red) ;
printf("Success: %d\n", success);
MAP_Interrupt_enableMaster();
printf("%f\r\n", red);
//clear = tempReadReg(SLAVE_ADDR,CLEAR_REG_ADDR_LOW, &clear);
//printf("%f\r\n", clear);
//
//green = tempReadReg(SLAVE_ADDR,GREEN_REG_ADDR_LOW, &green);
//printf("%f\r\n", green);
//
//blue = tempReadReg(SLAVE_ADDR,BLUE_REG_ADDR_LOW, &blue);
//printf("%f\r\n", blue);
}
}
int configRegWrite(uint8_t ui8Addr, uint8_t ui8Reg, uint8_t *Data, uint8_t ui8ByteCount)
{
int i = 0 ;
/* Load device slave address */
MAP_I2C_setSlaveAddress(EUSCI_B1_BASE, ui8Addr);
// Set write mode.
MAP_I2C_setMode(EUSCI_B1_BASE, EUSCI_B_I2C_TRANSMIT_MODE);
/* Send start bit and register */
MAP_I2C_masterSendMultiByteStart(EUSCI_B1_BASE, ui8Reg);
// Delay
for(i = 0; i < 2000; i++){}
/* Now write one or more data bytes */
while(1)
{
// Delay
for(i = 0; i < 2000; i++){}
/* While we still have data to send */
if(ui8ByteCount > 0 )
{
MAP_I2C_masterSendMultiByteNext(EUSCI_B1_BASE, *Data++);
}
else
{
MAP_I2C_masterSendMultiByteStop(EUSCI_B1_BASE);
MAP_I2C_clearInterruptFlag(EUSCI_B1_BASE, EUSCI_B_I2C_TRANSMIT_INTERRUPT0);
return(true);
}
ui8ByteCount--;
}
}
int tempReadReg (uint8_t address, uint8_t reg, uint16_t *value)
{
int result = false; // return value
uint8_t temp[2] = {0,0}; // data to send over I2C
int i = 0 ;
GPIO_toggleOutputOnPin(GPIO_PORT_P1, GPIO_PIN0); // toggle LED1
// Set the I2C address of the device we wish to talk to.
MAP_I2C_setSlaveAddress(EUSCI_B1_BASE, address);
// Set write mode.
MAP_I2C_setMode(EUSCI_B1_BASE, EUSCI_B_I2C_TRANSMIT_MODE);
// Write START + address + register to the sensor.
result = MAP_I2C_masterSendSingleByteWithTimeout(EUSCI_B1_BASE, reg, TEMP_TIMEOUT);
// Delay (needed to get reliable data from MCP9808)
//for(i = 0; i < 1000; i++){}
// Continue only if the write was successful.
if (result == true)
{
// Set read mode.
MAP_I2C_setMode(EUSCI_B1_BASE, EUSCI_B_I2C_RECEIVE_MODE);
// RESTART.
MAP_I2C_masterReceiveStart(EUSCI_B1_BASE);
// Read two bytes from the sensor, STOP.
temp[0] = MAP_I2C_masterReceiveSingle(EUSCI_B1_BASE);
result = MAP_I2C_masterReceiveMultiByteFinishWithTimeout(EUSCI_B1_BASE, &(temp[1]), TEMP_TIMEOUT);
// Parse the sensor's data.
*value = (uint16_t)(temp[0] << 8 | temp[1]);
}
GPIO_toggleOutputOnPin(GPIO_PORT_P1, GPIO_PIN0); // toggle LED1
return result;
}
void initializeI2C(void)
{
/* Select I2C function for I2C_SCL & I2C_SDA */
GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P1, GPIO_PIN7,
GPIO_PRIMARY_MODULE_FUNCTION);
GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_P1, GPIO_PIN6,
GPIO_PRIMARY_MODULE_FUNCTION);
/* Initializing I2C Master to SMCLK at 400kbs with no-autostop */
MAP_I2C_initMaster(EUSCI_B1_BASE, (const eUSCI_I2C_MasterConfig *)&i2cConfig);
/* Enable I2C Module to start operations */
MAP_I2C_enableModule(EUSCI_B1_BASE);
printf("Initialized the I2C right now.");
}

WEBENCH® Tools/OMAP-L138: PLL0ARM.OCSEL is not changed.

$
0
0

Part Number: OMAP-L138

Tool/software: WEBENCH® Design Tools

Hi,

After setting PLL0,PLL1, I'm trying additional settings of OCSEL in supervisor mode. But It is set as OSCIN(0x14).
I can't change this register to any other selection like 0x17, 0x18.
Now, OSCDIV is enabled as 0x8000, but OCSEL is not changeable even though on the register view of CCS.
pinmux13 is set to OBSCLK, and I can obserb 24MHz at T18 pin.
Could you give me a piece of advice?

Best Regards,

Tanaka

DRV8803: DRV8803 can be work on 4 lead motor?

$
0
0

Part Number: DRV8803

Hi 

DRV8803 can be work on 4 lead step motor?

If Yes. How to work?

Viewing all 262198 articles
Browse latest View live


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