Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Kuroro

Pages: 1 2 [3]
31
NXPTM M522XX, KINETIS and i.MX RT / Re: SP7 and ADC
« on: May 30, 2008, 10:32:51 AM »
Hello

I try again the adc adc 0 to 3 work but to 4 to 7 they stay blocked in :

while (results.ucADC_status[4] == ADC_RESULT_NOT_READY);


I don't understand why they work for the 4 first and no for the 4 last ?

Thank's




32
NXPTM M522XX, KINETIS and i.MX RT / Re: SP7 and ADC
« on: May 29, 2008, 07:26:44 AM »
Hello mark

Your example function for the channel 0 work perfectly but when I trie to change the channel they won't work.

For exemple if y want to use the channel 7

did i need to put :

adc_setup.int_adc_bit = 7;

or

adc_setup.int_adc_bit = 0x80;


Thank's

33
NXPTM M522XX, KINETIS and i.MX RT / Re: Question about LCD
« on: May 23, 2008, 07:29:25 AM »
I'm sorry you right i forgot i have modified it before i'm really sorry.

I work on a personal board and on the lcd port the rw pin is conected to the 0v so the lcd is all the time on write mode so i can't use the readdisplay function to check the busy state of the LCD so i have remove this check phase and I forgot i have do this modification.

Thank's

34
NXPTM M522XX, KINETIS and i.MX RT / Question about LCD
« on: May 22, 2008, 05:05:38 PM »
Hello I have a question about your code :

Code: [Select]
static int fnInitDisplay(int iState)
{
    // After power up the display needs to be idle for >= 30ms. This is ensured by a start up delay of the task

    if ((ucDispCount != 0) && (!fnSendDisplay())) return iState;         // return when display transmitter busy, sending next byte on the way


    if (iState > WRITE_FUNCTION_SET) {
        return iState;                                                   // LCD is busy
    }

    switch (iState) {
    case STATE_INIT:                                                     // initialise the LCD hardware once on startup
        INITIALISE_LCD_CONTROL_LINES();                                  // initialise the LCD hardware once on startup
    case STATE_INITIALISING:
        _fnWriteDisplay(0, INIT_FUNCTION_SET);                           // write function set
        uTaskerMonoTimer( OWN_TASK, T_INIT_WAIT, E_INIT_CONTINUE );      // wait at least 4,1ms the first time and 100us the second time - we do longer waits than necessayr
        break;

    case WRITE_FUNCTION_SET:
        _fnWriteDisplay(0, INIT_FUNCTION_SET);                           // repeat after at least 4,1ms
        _fnWriteDisplay(0, INIT_FUNCTION_SET_MODE);                      // set final value after another 100us (after this the LCD is in the required 4 or 8 bit mode)
        uTaskerStateChange(OWN_TASK, UTASKER_GO);                        // switch to polling mode of operation since BF (Busy Flag) is not valid
        break;

    case STATE_INIT_2:
        fnWriteDisplay(0, (INIT_FUNCTION_SET_MODE | N_BIT | F_BIT));     // 2 line mode, display on
        break;

    case STATE_INIT_3:
        fnWriteDisplay(0, DISPLAY_OFF_NO_CURSOR);
        break;

    case STATE_INIT_4:
        fnWriteDisplay(0, CLEAR_DISPLAY);
        break;


    case STATE_DISPLAY_INITIALISED:
        fnWriteDisplay(0, DISPLAY_ON_NO_CURSOR);

        // At this point the display is clear and the cursor is at the home position.
        // we inform the application that the initialisation has terminated, so that it can start using it
        fnEventMessage(LCD_PARTNER_TASK, TASK_LCD, E_LCD_INITIALISED);
        return STATE_LCD_READY;                                          // we are ready to work....

    case STATE_LCD_SENDING:
        uTaskerStateChange(OWN_TASK, UTASKER_STOP);                      // switch to event mode of operation
        fnEventMessage(LCD_PARTNER_TASK, TASK_LCD, E_LCD_READY);         // we have completed an operation for the application
        break;

    default:                                                             
        if (iState > STATE_LCD_READY) {                                  // writing a pattern
            if (--iState <= STATE_LCD_READY) {                           // last character to be written
                iState = STATE_LCD_SENDING;
            }
            fnWriteLine(ucTXDisp, 1, O_CONTROL_RS);                      // repeat the test pattern
        }
        return iState;
    }

    return (++iState);
}

How it's possible to reach the case : STATE_INIT_2

The code :
 
Code: [Select]
if (iState > WRITE_FUNCTION_SET) {
        return iState;                                                   // LCD is busy
    }

Short circuit the next line.
Could you explain to me how does it work because i don't understand yet .
Thank's

35
NXPTM M522XX, KINETIS and i.MX RT / Re: SP7 and ADC
« on: May 21, 2008, 03:51:30 PM »
Ok and you put them two task in the application task or in two separates task ?
Because if y put them in two separated task I stay blocked In the DO .

Thank's

36
NXPTM M522XX, KINETIS and i.MX RT / Re: SP7 and ADC
« on: May 21, 2008, 11:09:52 AM »
Excuse me again but I have another little probleme
ADC_RESULT_NOT_READY stay to 0 and the  result was never available

I inser the code
Code: [Select]
ADC_SETUP adc_setup;                                                 // interrupt configuration parameters
    ADC_RESULTS results;
    adc_setup.int_type = ADC_INTERRUPT;                                  // identifier when configuring
    adc_setup.int_adc_bit = 0;
    adc_setup.int_adc_result = &results;
    adc_setup.int_adc_mode = (ADC_READ_ONLY | ADC_GET_RESULT);
    fnConfigureInterrupt((void *)&adc_setup);                            // get result

    if (results.ucADC_status[0] != ADC_RESULT_NOT_READY) {
      //results.sADC_value[0];                                           // result here
    }


in a test task that I have build and I remplace the TEST_ADC configuration by your's

But that don't work, I probably do a mistake in the utilisation of the function but were ?

37
NXPTM M522XX, KINETIS and i.MX RT / Re: SP7 and ADC
« on: May 21, 2008, 07:16:46 AM »
This work fine !
thank's a lot mark.

38
NXPTM M522XX, KINETIS and i.MX RT / SP7 and ADC
« on: May 20, 2008, 04:39:05 PM »
Hello

It's possible to use the adc function to do a single ended convertion withou interupt ?

You do no have a simple example of utilisation of the ADC function ?

Thank's a lot !

Pages: 1 2 [3]