Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Super Contributor
shantanu75
Posts: 145
Registered: ‎04-06-2009
0

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)U f

Congrats! So you finally made your FPGA to communicate with the Modem.

All LED ON means you want to press the PB to repeat. 

Now try to understand the code which I have sent you and try to modify according to your requirement.

 

Already in the code I am saving the received data in an array - So you can check it - You can check in  particular position what data ou are getting.

 

Shantanu 

 

Shantanu Sarkar
http://www.linkedin.com/pub/shantanu-sarkar/0/33a/335
Super Contributor
moraali
Posts: 242
Registered: ‎12-06-2007
0

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Good evening, 

 

    Thank you for replying. So sorry disturbing you . I know you are busy. But i really need your help. I spent this few days understanding your coding. but there are some questions that i want to ask you ;-

 

1)

    RED  = Do not understand the function

    BLUE = The question regarding the RED

 

a) Please explain in detail of the RED purpose .

 

b) I having problem understanding the calculation LCD-hexadecimal relationship. Can you explain to me in detail. OR do you have any articles or references for that? I would like to read. I read in the internet , but I got confuse.

 

//========================================================================= 

// Located in: microblaze_0/include/xparameters.h
#include "xparameters.h"

#include "uartlite_header.h"
#include "xbasic_types.h"
#include "xgpio.h"
#include "gpio_header.h"

/************************** Constant Definitions ****************************/
//The following constant is used to for Delay Counter
#define DELAY_CONSTANT     10000


/*
 * The following constant controls the length of the buffers to be sent
 * and received with the UART, this constant must be 16 bytes or less since
 * this is a single threaded non-interrupt driven example such that the
 * entire buffer will fit into the transmit and receive FIFOs of the UART
 */
#define TEST_BUFFER_SIZE      16
#define GLOBAL_BUFFER_SIZE 32 //Max limit of Global_RX_Buffer
#define No_OF_COMMANDS       4   //hERE i'VE DEFINED 4 COMMANDS


/************************** Function Prototypes ****************************/
void Func_Delay(int Loop_counter);
void Send_Byte_to_LCD(Xuint32 LCDBit);
void Send_PKT_to_LCD(char *LCD_Byte,Xuint8 LineNo);
//Function To Clear the display to LCD
void Clear_LCD(void);
//Display Failure Message in LCD
void Disp_Failure_Msg(void);

//Reset Global RX Buffer and its End Pointer
void Reset_Global_Buffer(void);

//Send Commands to Modem thru DCE Rs232 Port
XStatus  Send_Command_To_Modem(unsigned char * Command_Text);
//Get Response of the Command set
void Get_Response_of_Command(Void);
//Function To SEND cARRIAGE rETURN & LINE fEED TO RS232 PORT
XStatus Send_End_of_Text_to_RS232(Xuint16 DeviceId);

//Function To wait for Push Button to be pressed
Xuint32 Wait_for_PB(void);

 

//====================================================
//Global Variables
extern Xuint8 Global_RX_Buffer[GLOBAL_BUFFER_SIZE]; /* Global Buffer for Receiving Data */
extern unsigned int Global_RX_Buf_EndPTR; /* Global Pointer pointind end of the Global Buffer for Receiving Data */

 

//-------------------------------------------------------------------

int main (void)
{

   Xuint32 LCDBit; 
   Xuint32 LedBit;
   Xuint32 Temp32Bit;
   Xuint32 Dip_SW_Val; 
 

   //Set the Flag when the serial communication gets syncronized between FPGA & Modem
   Xuint32 Flag_Syncronize = 0;  Why do we to create Flag? What is the function?
 

   XStatus status;
   int Index;
 //------------------------------------------------------------------------
 //*************************************************************************
   //Enable and initialize cache
   #if XPAR_MICROBLAZE_0_USE_ICACHE
      microblaze_init_icache_range(0, XPAR_MICROBLAZE_0_CACHE_BYTE_SIZE);
      microblaze_enable_icache();
   #endif

   #if XPAR_MICROBLAZE_0_USE_DCACHE
      microblaze_init_dcache_range(0, XPAR_MICROBLAZE_0_DCACHE_BYTE_SIZE);
      microblaze_enable_dcache();
   #endif
 //*************************************************************************

 //-------------------------------------------------------------------
 //Initialise LCD
 {
   //XStatus status;

   Func_Delay(1);//Initial PWR On Delay > 15mSec
   //------------------------------------------------------------------- 
   // Set for 4-bit LCD mode
   //-------------------------------------------------------------------   
   LCDBit=0x03; why is it 0x03? What does it do?
   Send_Byte_to_LCD(LCDBit);
   Func_Delay(1); //>4.1mSec
   //-------------------------------------------------------------------   
   LCDBit=0x03; Why it appear another time? What the purpose doing it again ?
   Send_Byte_to_LCD(LCDBit);
   Func_Delay(1);//>100uSec
   //-------------------------------------------------------------------   
   LCDBit=0x03; What the purpose doing it again ?
   Send_Byte_to_LCD(LCDBit);
   Func_Delay(1);//>100uSec
   //-------------------------------------------------------------------   
   LCDBit=0x02; //4 Bit /  why is it 0x02? What does it do?
   Send_Byte_to_LCD(LCDBit);
   Func_Delay(1);//>100uSec
   //-------------------------------------------------------------------   
   //2 Lines / 5X7
   LCDBit=0x02; //4 Bit /  Why it appear another time? What the purpose doing it again ?
   Send_Byte_to_LCD(LCDBit);
   Func_Delay(1);//>100uSec
   LCDBit=0x08;
   Send_Byte_to_LCD(LCDBit);
   Func_Delay(1);//>100uSec
   //-------------------------------------------------------------------   
   //Function To Clear the display to LCD
   Clear_LCD();
   //-------------------------------------------------------------------   
   //Initialization ends here
   //-------------------------------------------------------------------   
   Send_PKT_to_LCD("Testing LCD",1);
   Send_PKT_to_LCD("Press any PB",2);

 }
 //-------------------------------------------------------------------------
 status = Out_GPIO(XPAR_LEDS_DEVICE_ID, 0xFF); Just want to ensure that this will light up all the LEDs . But we need to put it in status?
 Temp32Bit =Wait_for_PB();
 status = Out_GPIO(XPAR_LEDS_DEVICE_ID, 0x00); Just want to ensure that this will not light up any the LEDs . But we need to put it in status?
 //-------------------------------------------------------------------------
 do//Clear the RX Buffer as a initialization
 {  Func_Delay(5);
    Temp32Bit = UartLite_Receive_Data(XPAR_RS232_DCE_DEVICE_ID);
 }while(Temp32Bit > 0);
 //-------------------------------------------------------------------------
 
 //For syncronization Send "AT\r" to Modem and check for "AT" in the Received byte
 //Repeat untill "AT" is not received.
 Clear_LCD();
 Flag_Syncronize = 0; //Reset the Flag
 Send_PKT_to_LCD("Synchronizing...",1);
 //-------------------------------------------------------------------------
 do
 {
  Func_Delay(200);
  if((++LedBit)>= 0xFF)LedBit=0x00; why do we need to do this? What is the purpose?
  status = Out_GPIO(XPAR_LEDS_DEVICE_ID, LedBit);
  
  Reset_Global_Buffer();
  Send_PKT_to_LCD("                ",2); Why is it blank? What is the purpose making it empty?
  
  status = Send_Command_To_Modem("AT");
  if (status != XST_SUCCESS)
  Disp_Failure_Msg(); //Display Failure Message in LCD
  status = Send_End_of_Text_to_RS232(XPAR_RS232_DCE_DEVICE_ID); 
  if (status != XST_SUCCESS)
  Disp_Failure_Msg(); //Display Failure Message in LCD
  
  Get_Response_of_Command();
  for(Index=0; Index < Global_RX_Buf_EndPTR; Index++) What actually this for loop does? Why the Flag_Syncronize should be 1?
  {

     if((Global_RX_Buffer[Index] == 'A') && (Global_RX_Buffer[Index+1] == 'T'))

         Flag_Syncronize = 1;

  }
  if(Flag_Syncronize > 0)break;
 }while(1);
 //-------------------------------------------------------------------------
 //Now ready to communicate.....
 Clear_LCD();
 Send_PKT_to_LCD(&Global_RX_Buffer[0],2); what does it display? Why it is 0 index in "&Global_RX_Buffer[0]" ?
 Send_PKT_to_LCD("Ready",1);
 for(Index=0,LedBit=0x01; Index < 8; Index++)
 {
  Send_PKT_to_LCD(".",0);
  Func_Delay(200);
  status = Out_GPIO(XPAR_LEDS_DEVICE_ID, LedBit);
  LedBit=LedBit << 1;
 }

 status = Out_GPIO(XPAR_LEDS_DEVICE_ID,0x00); 
 Clear_LCD();
 //-------------------------------------------------------------------------
 
 while(1)
 {
  
  //-------------------------------------------------------------------------
  
  if((++LedBit)>= 0xFF) What does it means? Why it has ++LedBit? what is the function of ++LedBit?

     ledBit=0x00;


  status = Out_GPIO(XPAR_LEDS_DEVICE_ID, LedBit);
  
  Reset_Global_Buffer();
  //-------------------------------------------------------------------------
  status = Input_Gpio(XPAR_DIP_SW_DEVICE_ID, &Dip_SW_Val); what is the function of doing this ?
  if (status != XST_SUCCESS)
  {
   Disp_Failure_Msg(); //Display Failure Message in LCD
   break;
  }
  //-------------------------------------------------------------------------
  switch(Dip_SW_Val)
  {
   case 0x01:
   Send_PKT_to_LCD("AT+CMGF=1",1);
   status = Send_Command_To_Modem("AT+CMGF=1");
   break;

   case 0x02:
   Send_PKT_to_LCD("AT+CMGS=+60179310740",1);
   //Breaking the Command as one cannot send more than 16 bytes at a time.
   status = Send_Command_To_Modem("AT+CMGS=");
   if (status != XST_SUCCESS)break;
   status = Send_Command_To_Modem("+60179310740");   
   break;
   
   default:
   Send_PKT_to_LCD("AT",1);
   status = Send_Command_To_Modem("AT");
  }
  //------------------------------------------------------------------------- 
  if (status != XST_SUCCESS)
  {
   Disp_Failure_Msg(); //Display Failure Message in LCD
   break;
  }
  //-------------------------------------------------------------------------
  status = Send_End_of_Text_to_RS232(XPAR_RS232_DCE_DEVICE_ID); 
  if (status != XST_SUCCESS)
  {
   Disp_Failure_Msg(); //Display Failure Message in LCD
   break;
  }
  //-------------------------------------------------------------------------
  Get_Response_of_Command();
  status = Out_GPIO(XPAR_LEDS_DEVICE_ID, 0xFF);
  Temp32Bit =Wait_for_PB(); What is the reason of putting it in 'Temp32Bit" ?
  
  Clear_LCD();

 }


 
 //*************************************************************************
   /*
    * Disable cache and reinitialize it so that other
    * applications can be run with no problems
    */
   #if XPAR_MICROBLAZE_0_USE_DCACHE
      microblaze_disable_dcache();
      microblaze_init_dcache_range(0, XPAR_MICROBLAZE_0_DCACHE_BYTE_SIZE);
   #endif

   #if XPAR_MICROBLAZE_0_USE_ICACHE
      microblaze_disable_icache();
      microblaze_init_icache_range(0, XPAR_MICROBLAZE_0_CACHE_BYTE_SIZE);
   #endif
 //*************************************************************************
   return 0;
}
//---------------------------------------------------------------------------
//Function required for Time Delay
void Func_Delay(int Loop_counter)
{
 volatile  int i;
 volatile  int j;
 
 for(i=0; i<= Loop_counter; i++)
 {
  for(j=0; j<=DELAY_CONSTANT; j++);
 }

}
//---------------------------------------------------------------------------

//Function To send Byte to LCD
void Send_Byte_to_LCD(Xuint32 LCDBit)
{
 XStatus status;
 
 status = Initialise_LCD(XPAR_LCD_4BIT_DEVICE_ID);//Initialize the GPIO used for LCD
 status = Out_LCD(XPAR_LCD_4BIT_DEVICE_ID, LCDBit);  what is the purpose of the "status"?
 Func_Delay(0);
 //Toggle Enable Bit
 status = Out_LCD(XPAR_LCD_4BIT_DEVICE_ID, (LCDBit | 0x40) ); Why is it OR? And why is it 0x40? how do you calculate?
 Func_Delay(0);
 status = Out_LCD(XPAR_LCD_4BIT_DEVICE_ID, (LCDBit & 0x3F) ); Why is it AND? And why is it 0x3F? how do you calculate?

 Func_Delay(0); 
}
//------------------------------------------------------------------
//Function To send Packet to LCD
void Send_PKT_to_LCD(char *LCD_Byte, Xuint8 LineNo)
{
 static Xuint8 No_of_Char;
 Xuint32 LCDBit;
 Xuint8 LCD_Byte_Ptr;
 
 if ((LineNo & 0x03) > 0)//New Line 0x03 denote what ?
 {
   if (LineNo == 2) 2 denote what?
   {LCDBit=0x0C;} //Set Addr to 2nd Line 0x0C denote what?
   else
   {LCDBit=0x08; }//If Bit 1 is High (1 or 3) - Set Addr to 1st Line 0x08 denote what?
 
  Send_Byte_to_LCD(LCDBit);
  No_of_Char = 0; why  it should be 0?
  Send_Byte_to_LCD(0x00); what is 0x00 means?
 }
 No_of_Char = 0; why need to do it again? what is the purpose?
 //If 0 then continuation to the previous
 //ie same line as previous


 for(LCD_Byte_Ptr=0; ;LCD_Byte_Ptr++) what actually this for loop does ?
 {
    if(LCD_Byte[LCD_Byte_Ptr]<=0)

      break;
   

   LCDBit = 0x20 | ((LCD_Byte[LCD_Byte_Ptr]>>4) & 0x0F); what purpose of this ? Whay is it 0x20?
  Send_Byte_to_LCD(LCDBit);

   LCDBit =0x20 | (LCD_Byte[LCD_Byte_Ptr] & 0x0F);
  Send_Byte_to_LCD(LCDBit);
  
  if(++No_of_Char > 16)
  {
    LCDBit=0x08; //Set Addr to 1st Line
    Send_Byte_to_LCD(LCDBit);
    Send_Byte_to_LCD(0x00); why it should be 0x00?
    No_of_Char = 0;
    break;
  }  
 }

}
//-------------------------------------------------------------------------
//Function To Clear the display to LCD
void Clear_LCD(void)
{

 Xuint32 LCDBit;
 //-------------------------------------------------------------------   
 
 LCDBit=0x00;//
 Send_Byte_to_LCD(LCDBit);
 Func_Delay(0);
 LCDBit=0x08; //Display Off why is it 0x08? What the function of this ?
 Send_Byte_to_LCD(LCDBit);
 Func_Delay(0);
 //-------------------------------------------------------------------   
 LCDBit=0x00;//4 Bit  why is it 0x00? What the function of this ? 
 Send_Byte_to_LCD(LCDBit);
 Func_Delay(0);
 LCDBit=0x01; //Clear Display why is it 0x01? 
 Send_Byte_to_LCD(LCDBit);
 Func_Delay(0);
 //-------------------------------------------------------------------   
 LCDBit=0x00;//4 Bit  why is it 0x00? What the function of this ? 
 Send_Byte_to_LCD(LCDBit);
 Func_Delay(0);
 LCDBit=0x06; //Entry Mode - Incremental / No Shift why is it 0x06? What the function of this ? What increment ?
 Send_Byte_to_LCD(LCDBit);
 Func_Delay(0);
 //-------------------------------------------------------------------   
 LCDBit=0x00;//4 Bit  why is it 0x00? What the function of this ? 
 Send_Byte_to_LCD(LCDBit);
 Func_Delay(0);
 LCDBit=0x0E; //Display On - Cursor On / No Blinking why is it 0x0E? What the actually it does ? 
 Send_Byte_to_LCD(LCDBit);
 Func_Delay(0);
 //-------------------------------------------------------------------   

}
//----------------------------------------------------------------------        
//Send Commands to Modem thru DCE Rs232 Port
XStatus  Send_Command_To_Modem(unsigned char * Command_Text)
{
 XStatus status;
 unsigned int ReceivedCount;
 
 //Clear RX Buffer before sending Data
 ReceivedCount = UartLite_Receive_Data(XPAR_RS232_DCE_DEVICE_ID); 
 Func_Delay(10); 
 
 status = UartLite_Send_Data(XPAR_RS232_DCE_DEVICE_ID, & Command_Text[0]);
   if (status != XST_SUCCESS) return XST_FAILURE;
 else return status; 

}
//-------------------------------------------------------------------------
//Get Response of the Command set
void Get_Response_of_Command(Void)
{
 unsigned int ReceivedCount;

 do//Wait till there is no data
 {  Func_Delay(5);
  ReceivedCount = UartLite_Receive_Data(XPAR_RS232_DCE_DEVICE_ID);
 }while(ReceivedCount <= 0); What the actually it does ? 
 
 do//Keep on receiving till buffer is not empty
 {  Func_Delay(5);
  ReceivedCount = UartLite_Receive_Data(XPAR_RS232_DCE_DEVICE_ID);
 }while(ReceivedCount > 0); What the actually it does ? 

 Send_PKT_to_LCD(&Global_RX_Buffer[0],2); What the actually it does ? Why is the GLOBAL_RX_Buffer index is 0?

}

 

 

//Function To SEND cARRIAGE rETURN & LINE fEED TO RS232 PORT
XStatus Send_End_of_Text_to_RS232(Xuint16 DeviceId)
{
 XStatus status;

 char  End_of_Text[3];
 
 End_of_Text[0]= 0x0D; why is it 0x0D?
 End_of_Text[1]= 0x0A; why is it 0x0A ?
 End_of_Text[2]= 0x00
why is it 0x00 ?
 status = UartLite_Send_Data(DeviceId, &End_of_Text[0]);
   return status;

}
//-------------------------------------------------------------------------
//Function To wait for Push Button to be pressed
Xuint32 Wait_for_PB(void)
{
 XStatus status;
 Xuint32 PB_Value = 0;
 do
 {
  status = Input_Gpio(XPAR_PB_SWS_DEVICE_ID, &PB_Value);
 }while((PB_Value <= 0)||(status == XST_FAILURE));
 return PB_Value;
}
//-------------------------------------------------------------------------
//Display Failure Message in LCD
void Disp_Failure_Msg(void)
{
 Xuint32 PB_SW_Val;
 XStatus status;
 
 Clear_LCD();
 Send_PKT_to_LCD("FAILURE",1);
 Send_PKT_to_LCD("Press PB Switch",2);
 
 status = Out_GPIO(XPAR_LEDS_DEVICE_ID, 0xFF);
 PB_SW_Val = Wait_for_PB();
}
//-------------------------------------------------------------------------
//Reset Global RX Buffer and its End Pointer
void Reset_Global_Buffer(void)
{
 unsigned int Index;
 
 for(Index=0;Index<GLOBAL_BUFFER_SIZE;Index++)
 Global_RX_Buffer[Index]= 0x00; why is it 0x00? What does it do ?
 
 Global_RX_Buf_EndPTR = 0; Why 0? Is it the end pointer?
}

//=========================================================================  

 

2)

 

a)

      Based on the below diagram, where is function part (above coding, please highlight for me in GREEN) for receiving the data from the Modem? I still do not understand how you did it ? How can the coding differentiate OK or ERROR

 

  

I am sorry if my questions is silly. But I really want to understand your wonderful coding throughly, so that i will be confident during my presentation. 

 

Please reply to me as soon as possible. 

 

Thank you very much . I really do appreciate your kind help.

Receive.JPG
Super Contributor
moraali
Posts: 242
Registered: ‎12-06-2007
0

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Good morning ,

 

   Are you there? I really need your help.

 

Thank you

Super Contributor
shantanu75
Posts: 145
Registered: ‎04-06-2009
0

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Regarding LCD pl find the attachment. Pl go thru it.

Shantanu

Shantanu Sarkar
http://www.linkedin.com/pub/shantanu-sarkar/0/33a/335
Super Contributor
moraali
Posts: 242
Registered: ‎12-06-2007
0

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Good evening

 

  I am sorry to disturb you. But I need your help. I am trying for the past few weeks but I can rectify this problem

 

AT  //I type at the hyperterminal

OK // respond by the modem

AT+CMGF=1

OK

AT+CMGR=6 // read SMS at the index 6

+CMGR: "REC READ","+60166223610",,"09/03/10,18:02:35+32"
1  // This is the only input that need to extracted.

OK

 

I altered the code but the answered I getting are not static . It always changing

 

1) Sometimes it appears like this at the LCD

 

1|| ||| OK

 

2) When I rerun again, it often it appears like this at the LCD

 

2" || ||| 1 || ||| OK

 

or 

 

32" || ||| 1 || ||| OK

 

or etc 

 

 

The code is in the attachment. How can I rectify this problem to get a static answer.

Super Contributor
moraali
Posts: 242
Registered: ‎12-06-2007
0

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)U f

Good evening,

 

   Above mail ,I just added this code in the program.

 

  void Get_MResponse_of_Command(Void) // I change the name
  {
       unsigned int ReceivedCount;
       char s ; //I added this
 
 

        do//Wait till there is no data
       {  Func_Delay(5);
           ReceivedCount = UartLite_Receive_Data(XPAR_RS232_DCE_DEVICE_ID);
       }while(ReceivedCount <= 0);
 
      do//Keep on receiving till buffer is not empty
      {  Func_Delay(5);
         ReceivedCount = UartLite_Receive_Data(XPAR_RS232_DCE_DEVICE_ID);     
      }while(ReceivedCount > 0);
 
 
       //ADDED HERE  
    

      Send_PKT_to_LCD(&Global_RX_Buffer[25],2); // it will appear  1 || ||| OK
      Global_RX_Buffer[26]= 0x00;
// Delete the remaining after the 1 . Eg:- This  1 || ||| OK  will appear  1


      //UartLite_Send_Data(XPAR_RS232_DCE_DEVICE_ID, &Global_RX_Buffer[25]);    // Send 1 to hyperterminal so that I can see
 
       char *z = &Global_RX_Buffer[25]; // Change it to char type
 
  
       if(*z == '1')
      {
           Out_GPIO(XPAR_LEDS_DEVICE_ID, 0xFF);  //light up LED
       }

}

 

 

 The only problem I facing is that the input extracted is not always the same . How can I get an accurate input so that I can trigger the LED.

 

 

Thank you

Super Contributor
moraali
Posts: 242
Registered: ‎12-06-2007
0

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Good evening,

 

     I am sorry for not replying to you earlier beacuse I was trying to solve the problem by myself until I did not notice the time flew so fast.

Please do not get annoyed. I  had altered the coding , I got the output , but it was not accurate. My supervisor want an accurate answer.

Please help me.  

 

 

 

Your help is really being appreciated. Thank you

Super Contributor
moraali
Posts: 242
Registered: ‎12-06-2007
0

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Good morning,

 

  Are you there ? Please help me .

 

Thank you

Super Contributor
shantanu75
Posts: 145
Registered: ‎04-06-2009
0

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

It seems your buffer "Global_RX_Buffer"  is not getting clear properly.

Any way You want to retrieve the value 1. One option is

1> take 2nd Array

2> Copy the contents of Global_RX_Buffer to it - Copy only the characters "a to z", "A to Z" or "0 to 9". Befory doing the copy make sure all the contents are 0.

3> Start reading from the end. - First valid caharacter you will get is K follwed by O. The next charracter must be 1.

 

For example

32" || ||| 1 || ||| OK 

 

when you are going to store it in the 2nd Array - It will be like this 321OK

Now Reading from End - KO123. (Ignore the content with values 0x00).

 

Hope this will help you.

 

 

Shantanu Sarkar
http://www.linkedin.com/pub/shantanu-sarkar/0/33a/335
Super Contributor
moraali
Posts: 242
Registered: ‎12-06-2007
0

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Good morning

 

 

   Sorry to disturb you , but I need your expertise

 

 

 

1) Folder_1

 

=> open the Pic.jpeg

=> If you observe , you can see that the value I extracted is not always same . It should only be 1 , not other value, eg:- 3.

=> How should I rectify this problem

 

 

2) Folder_2

 

=> open the block_diagram.jpeg

=> I want to connect the serial cable (null modem) at the Expansion Header. The pin name (ug080.pdf at page 21 )

=> This are the steps I need to do (if wrong pls let me know )

     1) Change the ucf file

          Net fpga_0_RS232_Uart_RX_pin LOC=AA24;

       

         Ignore this (If I need to change this , what should I change ?)

           Net fpga_0_RS232_Uart_RX_pin IOSTANDARD = LVCMOS33;

 

    

      2) Do the MAX2323 board

 

      3) Connect wire to between MAX2323 and ML401

         

          Rx   = J6,Pin2

          Tx   = J6,Pin4

          Vcc = Pin 3.3V

          Gnd =Gnd

 

      4) Connect wire to between MAX2323 and Serial Port.

 

 

      I reaaly need your help. Please reply to me as soon as possible

 

Thank you