I’ve got a time-problem with my Q2686.
I have to implement a soft I2C on the Q2686 because of my Li+ Battery Monitor (Maxim DS2762).
The DS2762 has a one wire communication (Dallas 1-Wire) with a time slot of 60us…
With Q2686 i can toggle with 23us, but the change of direction has a duration of 150us because of the slow adl_ioSetDirection-Function
Does anybody have an idea of fixing that problem?
My actual code:
adl_ioDefs_t gpio = GPIO_PIO; adl_ioDefs_t gpioc = gpio | ADL_IO_GPIO | ADL_IO_GPI | ADL_IO_DIR_IN ; adl_ioDefs_t gpioo = gpio | ADL_IO_DIR_OUT; adl_ioDefs_t gpioi = gpio | ADL_IO_DIR_IN; pioHandle = adl_ioSubscribe(1, &gpioc , 0, 0, 0) ; //Now, it's an input (has an extern Pull-Up) adl_ioSetDirection(pioHandle,1,&gpioo); //Now it's a output adl_ioWriteSingle(pioHandle, &gpio, FALSE); //Write something, should take 60us adl_ioSetDirection(pioHandle,1,&gpioi ); //Change shouldn't take more than 20us //Now it's an input returnwert=adl_ioReadSingle (pioHandle, &gpio ); //Read the answer