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

RTOS/AM3358: SYSBIOS interrupt handling speed

$
0
0

Part Number:AM3358

Tool/software:TI-RTOS

Champs,

We are debugging a customer issue with on ARM A8 core,

SYSBIOS: 6.52.0.12

Compiler: GNU 6.3.1.

The code likes this:

taskFxn () {

....

Error_init(&eb);
Timer_Params_init(&contTimerParams);

contTimerParams.period = 500; // 

contTimerParams.periodType = Timer_PeriodType_MICROSECS;
contTimerParams.arg = 1;

contTimerParams.startMode = Timer_StartMode_AUTO;

//delayTimerParams.runMode = Timer_RunMode_ONESHOT;
contTimerParams.runMode = Timer_RunMode_CONTINUOUS;

contTimerHandle = Timer_create(2, timeIsr, &contTimerParams, &eb);

if (contTimerHandle == NULL) {
System_abort("Timer create failed");
}

customer application code; 

}

The timeIsr is simply a counter and should not use any cycles. The timer is HWI as seen in ROV view. 

When the contTimerParams.period = 500; , the customer application code following the timer_create can be executed normally. If the contTimerParams.period = 300; the application code can't get chance to run (e.g, set a break point, and can't be hit).

We added a UIA module to track the CPU load. When the timer interrupt interval is 2000 us, the CPU load is already ~70%. When timer interrupt interval is 1500 us, the CPU load is ~100%. Reducing the interrupt interval further, the CPU is totally busy and no CPU load graph can be generated. I believe the UIA module itself takes cycles as well. 

The real usage case for customer is they have interrupt came in every 125 us. 

In SYSBIOS, is there any configuration to let application has chance to run when the there is interrupt happening at fast pace?

Regards, Eric


IWR1443: IWR 1443 EVM

$
0
0

Part Number:IWR1443

I have been trying to reflash the EVM using "uniflash 4.2.2.1692" and "mmwaveSDK v1.01..00.02-Linux"

I have followed the instructions as given in the userguide and my board does not get reflashed for some reason.

I have attached a pic of where I am struck at in the process and from there on, I receive no sort of response from the sensor board.

Thanks in advanced

TMS570LC4357: L2FMC diagnotic questions

$
0
0

Part Number:TMS570LC4357

1. TMS570LC43x TRM lists the following feature: "Symmetric dual port (Port A and Port B) for higher performance and concurrent access to different banks from one or more bus masters."  How is the port delegation of different operations done? Does the programmer have any control over this?

2. Section 7 of the TRM lists several diagnostic tests that can be performed:

 I) 7.6 Deliberate ECC Errors for FMC ECC Checking - Read from single and double-error OTP and verify SEC and expected ESM faults.

 II) 7.8.2.2 ECC Data Correction Diagnostic Mode 7: Manipulate the data and/or ECC to verify SEC and expected ESM faults.

 III) 7.8.4 SECDED Software Diagnostic: Implicit read L2FMC SECDED test.

Test (III) contains a procedure to verify L2FMC SECDED, but it seems L2FMC SECDED can be better verified by running test (II) or test (I) because we can provide error input. Is my understanding correct here? Do we gain any additional coverage by running test (III), if we have already performed test (I) or (II)?

3. My customer has been experimenting with DIAGMODE=5   (described in 7.8.2.1 Address Tag Register Test Mode 5). They  get the expected results for DIAG_BUF_SEL = {4, 5, 6, 7} (ADD_TAG_ERR gets asserted), but not for DIAG_BUF_SEL = {0, 1} (ADD_TAG_ERR remains deasserted) (in other words, they get the expected result when testing Port B buffers but not port A buffers). They also see the same behavior whether executing the test routine out of SRAM or flash (note that step (1) in this test is "Branch to a non-flash region for executing this sequence). Do we have any suggestion or idea what might be happening here?

Thanks!

CC2530-CC2592EM-RD: SAW Filter for LTE Coexistence

$
0
0

Part Number:CC2530-CC2592EM-RD

Hi, does anyone have experience/recommendations with using a SAW/BAW filter with the CC2530/CC2592 reference design? My questions are specifically:

1. Will reflection of harmonics back into the PA damage the CC2592?  Or significantly increase current consumption?  e.g. for reasons mentioned here: 

processors.wiki.ti.com/.../CC26xx_Optimal_Load_Impedance

2. Are there any components added for filtering that could be eliminated from the TI reference design if we use a SAW/BAW filter?  We're working off this design:

www.ti.com/.../tidra40a.pdf

3. Are Bluetooth/WLAN filters (e.g. Qualcomm B39242B8840P810) bidirectional for both RX and TX?  All seem to be specified with an "input" and "output" pin, however reference designs (e.g. CC3200 LaunchPad) use them bi-directionally...

We are considering this filter because of likely interference from cellular base-stations in the 2305-2360MHz and 2495-2690MHz bands.  I don't think the filter in the TI reference design has steep enough roll-off to attenuate these bands significantly, also we are using a wide-band antenna (TI design SWRU120C).  We can "punch through" the interference by turning the CC2592 up to ~22dBm, however would prefer a lower-power and more selective design for SAR exposure, compliance, and battery-life reasons.

Thanks,

Dave

LM3150: Startup failure due to low ESR output capacitors

$
0
0

Part Number:LM3150

24VDC in, 6.6VDC/12A out, right out of WEBENCH. Instead of using one large 100uf ceramic output cap, I used five 22uf ceramics (1206 size) in parallel. Regulator failed to start. I'd get one or two pulses on the high side gate, then the high side gate stuck high for about 7us, then went low and stayed that way forever. Output voltage had just barely started to ramp up, then fell to zero. 

I tried different add-ons of input and output caps to no avail. Finally took off the five 22uf ceramics and replaced them with a single 100uf electrolytic...and it started working. Pretty noisy though, so I added back one 22uf ceramic and that still worked. When I tried a 470uf electrolytic, it stopped working again.

I found no explanation for this in the datasheet; how is it possible that the oscillator stops working after a few cycles and never recovers? It appears to be something related to the output capacitor ESR, and I'm assuming that some part of the feedback loop is relying on more of a switching 'glitch' than was being allowed by the parallel ceramic caps. Strange that it would just halt and never come on. Assuming it was maybe something related to input power ramp-up rate, I put in a one second delay from the microcontroller and added a FET to pull down the enable signal until power-up was complete and stable. That didn't help. Screen shot below illustrates the behavior...24V is up and stable, and we're triggering at the end of the one second delay as enable is released high.

Yellow trace is Vin (24VDC) and blue trace is the high-side FET gate.

AM3352: Voltage on ADC input pin before SOC is powered

$
0
0

Part Number:AM3352

Hi,

a customer wants to confirm that it is ok to have a 1.1V level on the AIN5/B8 pad of the AM3352, prior to the chip being powered. It has to do with the rest of the systems that the level happened to be applied. Is this ok?

Thanks!

--Gunter

INA827: error caculation of noise

$
0
0

Part Number:INA827

I can't work out the figures of Error of Noise in the table2 of the ina827 datasheet。

RTOS/CC2650: UART read. Missing the first byte. TIMAC 1_05_02_43299

$
0
0

Part Number:CC2650

Tool/software:TI-RTOS

Hi, 

I'm using TIMAC  1_05_02_43299 and tirtos_simplelink_2_11_01_09. 

The CC2650 communicates with another MCU over the UART. 

In MSA_ProcessEvent() function I receiver an RF packet and send it over the UART using UART_write(). The other MCU responds but CC2650 is always missing the first byte. 

The uart runs in read callback mode but it never gets interrupt to read the first byte. 

UART_write is running in blocking mode. 

The first byte from the response comes 200 us after data is transmitted. The rest come a few ms later. 

Any ideas?

Thanks


TAS5753MDEVM: Purepath access

$
0
0

Part Number:TAS5753MDEVM

I have the tas5753mdevm and purpath motherboard. I have requested access for the PurePath gui software twice with no response. Please let me know what I can do to download the software in order to use my EVM.

TMS320DM8168: H.264 Codec Metadata

$
0
0

Part Number:TMS320DM8168

Customer running standalone encoder test bench and has the following questions:

  1. Does the H.264 codec support IH264_SEI_USER_DATA_UNREGISTERED in version 02.00.09.00
  2. What is the correct method to set the metadataType to IH264_SEI_USER_DATA_UNREGISTERED?
  3. Do any parameters (numMetaPlanes, metadataPlaneDesc, NALU bit field) need to be configured BEFORE or AFTER the metadataType is set?
  4. Are there any other parameters that need to be configured before using  IH264_SEI_USER_DATA_UNREGISTERED?

Regards,


Lawrence

CCS/TM4C129XNCZAD: Debugging an asm bootloader

$
0
0

Part Number:TM4C129XNCZAD

Tool/software: Code Composer Studio

I am having problems when debugging the TivaWare project boot_emac_flash. The project should download a new firmware image via Ethernet.

Breakpoints don't work initially and I can't step through the assembly code. These two issue combined make it impossible for me to see any initial setup code. The code doesn't run properly with optimizations off. I think the issues are caused by the chip running code from SRAM.

Breakpoints for C files can not be set when the code is first loaded. Disabling and enabling a breakpoint will cause it to take effect after the code is allowed to run. I also see the breakpoint take efect if the chip is suspended and resumed, but thos results are intermittent. I know the processor will hit a while(1) loop on line 1776 of bl_emac.c. I set a break point in this loop. Pausing the chip shows it is within this loop. I can single step over the breakpoint. After I resume running, the chip might start hitting the breakpoint . If I pause, disabled and re-enabled the breakpoint, it will break. I do this by unchecking and checking the box in the Breakpoints window. Note to re-create this issue, the dev kit needs to be plugged into a switch. A previous wait looks for network connectivity. before hitting line 1776 of bl_emac.c

Line 257 of bl_startup_ccs.s does not work with the step over or step into commands. Either of those commands seem to act like the command resume running. ProcessorInit is on line 190 of bl_startup_ccs.s. I can set a break point after the label "ProcessorInit " and it will stop, but the process will behave as if "resume running" was clicked if the breakpoint is not set.

With optimizations off, the chip does not go to the function specified by the reset vector. I can see the reset vector is set to 0x16D5 in the memory browser and the disassembly shows ResetISR() at 0x2000016D4, but this point is not hit by the first step over. I think the PC arrives at the wrong function by error (

With optimizations on, ResetISR() is hit by the first step over with optimizations on when the reset vector is 0x0DC9 and ResetISR() at 0x20000DC8

The disassembly window always shows the processor at some 0x2000XXXX address which is why I believe the setup code makes the chip operate from SRAM.

I import the project from TivaWare_C_Series 2.1.4.178. I follow CCS warning to change the compiler from TI v5.2.6 to TI v18.1.1.LTS. CCS is at version  8.0.0.00016. The target hardware is the EK-TM1294XL. The connection is ICDI.

CDCE62005EVM: Windows 10 Driver Installation

$
0
0

Part Number:CDCE62005EVM

Hi, 

I am trying to setup the software for the CDCE62005 EVM on my Windows 10 laptop and I am having trouble with the driver installation. 

After successfully installing the GUI, I am having trouble installing the driver as recommended in the User Guide. 

I connect the EVM to my computer via USB and Windows 10 does not recognize the device and lists it as an "Unknown Device" in the Device Manager. 

I then attempt to install the driver manually as recommended in the instructions. However, when I point Windows 10 to the Program Files folder associated with the EVM, it does 

not recognize any of the files in the Program Files (x86)\Texas Instruments\CDCE62005 EVM Software\Driver as drivers. 

Has there been a driver update to support Windows 10 for this part? 

If so, where can I access it? 

Compiler/MSP430G2553: I2c Problem using Energia

$
0
0

Part Number:MSP430G2553

Tool/software: TI C/C++ Compiler

Hello,

I have a question regarding using Arduino ode on Energia.

I am trying to use the sample code from Single tact which is in Arduino in MSP430 using Energia.

I am using P1_7 as SDA abd P1_6 as SCL. I am not able to use I2C communication?

Is there any modification required for using it in Energia?

Here is the sample code:

#include <Wire.h> //For I2C/SMBus

void setup()
{
Wire.setModule(0);
Wire.begin(); // join i2c bus (address optional for master)
//TWBR = 12; //Increase i2c speed if you have Arduino MEGA2560, not suitable for Arduino UNO
Serial.begin(57600); // start serial for output
Serial.flush();
}

void loop()
{
byte i2cAddress = 0x04; // Slave address (SingleTact), default 0x04
short data = readDataFromSensor(i2cAddress);
Serial.print("I2C Sensor Data:");
Serial.print(data);
Serial.print("\n");
delay(100); // Change this if you are getting values too quickly
}


short readDataFromSensor(short address)
{
byte i2cPacketLength = 6;//i2c packet length. Just need 6 bytes from each slave
byte outgoingI2CBuffer[3];//outgoing array buffer
byte incomingI2CBuffer[6];//incoming array buffer

outgoingI2CBuffer[0] = 0x01;//I2c read command
outgoingI2CBuffer[1] = 128;//Slave data offset
outgoingI2CBuffer[2] = i2cPacketLength;//require 6 bytes

Wire.beginTransmission(address); // transmit to device
Wire.write(outgoingI2CBuffer, 3);// send out command
byte error = Wire.endTransmission(); // stop transmitting and check slave status
if (error != 0) return -1; //if slave not exists or has error, return -1
Wire.requestFrom(address, i2cPacketLength);//require 6 bytes from slave

byte incomeCount = 0;
while (incomeCount < i2cPacketLength) // slave may send less than requested
{
if (Wire.available())
{
incomingI2CBuffer[incomeCount] = Wire.read(); // receive a byte as character
incomeCount++;
}
else
{
delayMicroseconds(10); //Wait 10us
}
}

short rawData = (incomingI2CBuffer[4] << 8) + incomingI2CBuffer[5]; //get the raw data

return rawData;
}

TPS65982: Using TPS65982 in DP ALT mode

$
0
0

Part Number:TPS65982

Hello,

we are using the TPS65982 in DP alt mode. We are configured as a DFP_D and we supply 5V @ 1.5A on VBUS.

We are observing an issue with the AUX+/- pins where we are not measuring the correct DC voltage on the pins and as such are failing compliance. As far as I understand the 65982 it has an internal 100k pullup to 3V3 on AUXN and a 100kpulldown on the AUXp.

My feeling is that we have the TI part configured incorrectly.

We are currently going trhough compliance and we are failing the AUX DC voltage which might indicate we are not pulling up/down the right RPU resistors in the AUX MUX.

Let me know what information I can send you to assist in the debug. Is there someone who is a DP Alt mode specialist that can assist.

Regards,

Guy

CC2650: Power Consumption (Peripheral+Broadcaster)

$
0
0

Part Number:CC2650

In a sensor I am developing, the available power is limited. This way, I need to reduce the communication usage.

My idea is to communicate hourly by broadcasting, and after that provide a connection as a peripheral by some seconds, just in case some parameters (time between connections, data needed) need to be adjusted.

In the first data stream as a broadcaster, how many times do the beacon event needs to be emitted to guarantee the data is received?

In the second communication, as a peripheral waiting for connection, how many times do the advertising event needs to be emitted to let the possibility of connection exist for 2 seconds?

Would the connection from the beginning as peripheral be less energy demanding?

Also, when the central ends the connection, does the peripheral recognizes that?


RTOS/CC2650: Using HapiProgramFlash() vs FlashProgram() function from driverlib

$
0
0

Part Number:CC2650

Tool/software:TI-RTOS

Which function should I use to write to flash memory (I'm writing an OTA firmware update program), HapiProgramFlash() or FlashProgram()?  And why?

Thanks!

CC2538: Detecting CPU Utlization

$
0
0

Part Number:CC2538

Hi,

I would like to make sure that the CC2538 is not being CPU saturated with an application running on top of Z-Stack. What methods can I use to ascertain how much idle time is available or time the CPU is utilized?

I thought about a osal timer with a short interval and measuring the jitter. Is there a better way? What do TI do here?

BQ76PL455A: Multidrop Comms Scheme instead of Daisychain

$
0
0

Part Number:BQ76PL455A

Hello,

I am designing a BMS for a battery pack application and I would like to know if the BQ76PL455A is capable of creating such communication scheme. I would like to use for each BQ76PL455A, a microcontroller that controls and communicates with each BQ76PL455A independently. These micros are going to be connected to a CAN bus. I've done the same with the BQ76PL436A and it works perfectly. Would like to know if this can be done with the BQ76PL455A.

Much appreciated,

Carlos Ramos

TLC59116: About supply current at Vcc=3.3V, /RESET pin is low (Standby mode)

$
0
0

Part Number:TLC59116

Hi Team,

 

Our customer would like to know the typical value of supply current at Vcc=3.3V, /RESET pin is low (Standby mode).

Could you please let us know if you have any data?

 

I’d greatly appreciate your verification.

 

Regards,

Kanemaru

TM4C123GH6PM: Tiva C launchpad with LCD 16x2 in 8 bits mode

$
0
0

Part Number:TM4C123GH6PM

Hi, I've been strugling for 2 weeks triying to connect my launchpad to an LCD 16x2 in 8bits mode (I try 4bits too, but I read that it should be easier in 8bits), and I'm lost, I try changing everything, right all again, read forums about this and could not find any solution :/

Connections
D0-D7  ----> B0-B7

E ----> D0

Rs ---> D1

RW---> GND

I have the contrast connected , so I can regulate it.


My code (there are some irrelevant includes that are for other things):

#define TARGET_IS_BLIZZARD_RA1
#include <stdint.h>
#include "stdlib.h"
#include <stdbool.h>
//#include "inc/hw_can.h"
//#include "inc/hw_ints.h"
//#include "driverlib/fpu.h"
//#include "driverlib/can.h"
//#include "grlib/grlib.h"
//#include "drivers/cfal96x64x16.h"
//#include "utils/uartstdio.h"
//#include "driverlib/interrupt.h"

//#define TARGET_IS_BLIZZARD_RA1
#include <stdio.h>
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
//#include "driverlib/rom.h"
//#include "driverlib/uart.h"
//#include "driverlib/adc.h"
//#include "utils/uartstdio.h"
//#include "driverlib/pin_map.h"
//#include <inttypes.h> //se utiliza para imprimir los valores uint32_t


#include "math.h"


//*****************************************************************************
//
// The error routine that is called if the driver library encounters an error.
//
//*****************************************************************************
#ifdef DEBUG
void
__error__(char *pcFilename, uint32_t ui32Line)
{
}
#endif
//Declarations

#define LCD_DATA GPIO_PORTB_BASE //LCD data port to PORTb
#define ctrl PORTE //LCD control port to PORTE
#define rs GPIO_PIN_1 //register select signal to RE0

#define en GPIO_PIN_2 //enable signal to RE2

//Function Prototypes
void init_LCD(void); //Function to initialise the LCD
void LCD_command(unsigned char cmd); //Function to pass command to the LCD
void LCD_data(unsigned char data); //Function to write character to the LCD
void LCD_write_string(char *str);//Function to write string to the LCD
void msdelay (unsigned int time); //Function to generate delay


// DEFINICION DE PUERTOS
#define perifericoData SYSCTL_PERIPH_GPIOB
#define writeData GPIO_PORTB_BASE
#define B0 GPIO_PIN_0
#define B1 GPIO_PIN_1
#define B2 GPIO_PIN_2
#define B3 GPIO_PIN_3
#define B4 GPIO_PIN_4
#define B5 GPIO_PIN_5
#define B6 GPIO_PIN_6
#define B7 GPIO_PIN_7
#define dataPins B0|B1|B2|B3|B4|B5|B6|B7

#define perifericoControl SYSCTL_PERIPH_GPIOD
#define writeControl GPIO_PORTD_BASE
#define E GPIO_PIN_0
#define RS GPIO_PIN_1
#define controlPins E|RS

#define perifericoLed SYSCTL_PERIPH_GPIOF
#define writeLed GPIO_PORTF_BASE
#define led1 GPIO_PIN_1
#define led2 GPIO_PIN_2
#define led3 GPIO_PIN_3
#define leds led3|led2|led1
#define cian 0x0C
#define azul 0x04
#define rojo 0x02
#define verde 0x08
#define off 0x00


int delayms (int tiempo){
int resultado = 1000 * (tiempo / (0.0000625*1000));
return resultado;
}
int delayus (int tiempo){
int resultado = 1000 * (tiempo / (0.0625*1000));
return resultado;
}

//Start of Main Program
int main(void)
{
char var1[] = "I";//Declare message to be displayed

/*Set the clocking to directly run from the crystal at 16MHz*/
SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_XTAL_16MHZ | SYSCTL_OSC_MAIN);

/* Set the clock for the GPIO Port B y D */
SysCtlPeripheralEnable(perifericoControl);
SysCtlPeripheralEnable(perifericoData);
SysCtlPeripheralEnable(perifericoLed);
/* Set the type of the GPIO Pin */
SysCtlDelay(8000000);

GPIOPinTypeGPIOOutput(GPIO_PORTB_BASE, B0|B1|B2|B3|B4|B5|B6|B7);
GPIOPinTypeGPIOOutput(GPIO_PORTD_BASE,E|RS);
GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE,led3|led2|led1);
SysCtlDelay(8000000);


init_LCD(); // call function to initialise of LCD
SysCtlDelay(8000000);


/*
LCD_command(0xC0); // initiate cursor to second line 0b1100 0000
LCD_write_string(var2);//Display message on second line
*/
while (1){ //Loop here
LCD_write_string(var1); //Display message on first line
GPIOPinWrite(writeLed, led3|led2|led1 ,azul);//LED AZUL

SysCtlDelay(delayms(1000));
GPIOPinWrite(writeLed, led3|led2|led1 ,off);//LED AZUL
}
} //End of Main

//Function Definitions
void msdelay (unsigned int time) //Function to generate delay
{
unsigned int i, j;
for (i = 0; i < time; i++)
for (j = 0; j < 275; j++);//Calibrated for a 1 ms delay in MPLAB
}

void init_LCD(void) // Function to initialise the LCD
{
//16MHz ---- 62.5ns
SysCtlDelay(8000000); // 550000 ciclos
GPIOPinWrite(writeControl, RS | E, 0x00); //COLOCO RS Y E en 0 por las dudas Rs = 0 para instrucciones E = 1 cuando se comienza a escribir

//clear display 0b 0 0 0 0 0 0 0 1
//return home 0b 0 0 0 0 0 0 1 x
//entry mode set 0b 0 0 0 0 0 1 I/D S I/D = 1 mueve el cursor a la derecha S = 1 mueve el display
//display on/off 0b 0 0 0 0 1 D C B D display C cursor B blink
//cursor or display shift 0b 0 0 0 1 S/C R/L x x S/C = 0 mueve cursor R/L = 1 derecha
//function set 0b 0 0 1 DL N F x x DL = 1 - 8bits mode N = 1 - 2line display F = 1 - 5x11dots

// FIRST 

GPIOPinWrite(writeLed, leds ,rojo);
LCD_command(0x3F);
GPIOPinWrite(writeLed, leds ,off);
SysCtlDelay(delayms(5));

// SECOND

GPIOPinWrite(writeLed, leds ,rojo);
LCD_command(0x3F);
GPIOPinWrite(writeLed, leds ,off);
SysCtlDelay(delayus(110));

// THIRD

GPIOPinWrite(writeLed, leds ,rojo);
LCD_command(0x3F);
GPIOPinWrite(writeLed, leds ,off);
SysCtlDelay(delayus(110));

// FORTH

GPIOPinWrite(writeLed, leds ,rojo);
LCD_command(0x30);
GPIOPinWrite(writeLed, leds ,off);
SysCtlDelay(delayms(2));

// FIVETH

GPIOPinWrite(writeLed, leds ,rojo);
LCD_command(0x08);
GPIOPinWrite(writeLed, leds ,off);
SysCtlDelay(delayms(2));

//SIXTH

GPIOPinWrite(writeLed, leds ,rojo);
LCD_command(0x01);
GPIOPinWrite(writeLed, leds ,off);
SysCtlDelay(delayms(2));

//SEVENTH

GPIOPinWrite(writeLed, leds ,rojo);
LCD_command(0x06);
GPIOPinWrite(writeLed, leds ,off);
SysCtlDelay(delayms(2));

//EIGHTH  display on cursor on blink on

GPIOPinWrite(writeLed, leds ,rojo);
LCD_command(0x0F);
GPIOPinWrite(writeLed, leds ,off);
SysCtlDelay(delayms(2));

}

void LCD_command(unsigned char cmd) //Function to pass command to the LCD
{


GPIOPinWrite(writeData, B7|B6|B5|B4|B3|B2|B1|B0,cmd);

GPIOPinWrite(writeControl, RS | E, 0x00);
SysCtlDelay(delayus(3));

GPIOPinWrite(writeControl, RS | E, 0x01);//Generate High to low pulse on EN
SysCtlDelay(delayus(3));
GPIOPinWrite(writeControl, RS | E, 0x00);
SysCtlDelay(delayus(110));
}

void LCD_data(unsigned char data)//Function to write data to the LCD
{
/* Writing Command on Port B*///Send data on LCD data bus
GPIOPinWrite(writeControl, RS | E, 0x02);//RS = 1 since DATA to LCD
GPIOPinWrite(writeData, dataPins ,data);
GPIOPinWrite(writeLed, led3|led2|led1 ,verde);//LED VERDE

SysCtlDelay(delayus(3));


GPIOPinWrite(writeControl, RS | E, 0x03);//RS = 1 since DATA to LCD
SysCtlDelay(delayus(3));

GPIOPinWrite(writeControl, RS | E,0x02);
GPIOPinWrite(writeLed, led3|led2|led1 ,0x00);//LED
SysCtlDelay(delayus(110));
}
//Function to write string to LCD
void LCD_write_string(char *str)
{
int i = 0;
while (str[i] != 0)
{
LCD_data(str[i]); // sending data on LCD byte by byte
SysCtlDelay(8000000);
i++;
}
}

Viewing all 262198 articles
Browse latest View live


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