Jump to content
43oh

Hyperterminal to MSP430 via UART, Print it to Display JHD162A


Recommended Posts

Hello MSP430 coders once again

 

i am working on the latest thing such as take input from the Hyper terminal or Putty, and display it in jhd162a (16x2 display) via MSP430G2231

 

I successfully finished

1. UART with Hyper-terminal

2. Displaying String to JHD162A

 

the problem i am facing in g2231 is .. i am able to print String only like

.............taking example :P

printf("Hello this is launchpad");

 

but i want to make it print like

int i = 0;

for(i=o;i<=200;i++)

(

printf("The number is : %d ", i);

)

 

i am giving you scenario so i take the printf Example ..

 

used code for printf is

 

inline void printf(const char *str)

{

P1OUT |= BIT6; // green led

 

uint i;

uint len = strlen(str);

for (i = 0; i < len; i++) {

// wait for TXBUF to complete last send...

// UCA0TXIFG is high when UCA0TXBUF is empty

while (!(IFG2 & UCA0TXIFG));

UCA0TXBUF = str;

txbytes++;

}

 

}

 

need your suggestions

Link to post
Share on other sites
  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...