Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

USB low-full-high speed peripherals Forum Discussions

EvSt_281971
Level 2
First like received First like given
Level 2

Oddities in the work -
Here is my code:

   

#include "fx2.h"
#include "fx2regs.h"

void configure_chip(void)
{
    OEB = 255;
    PB1 = 0;
}

void main (void)
{
configure_chip();
PB0 = 1;
}

   


This code does not give a positive potential on the PB0 - why?

If you do this:

   

void main (void)
{
configure_chip();
PB0 = 1;

   

PB0 = 1;

   

PB0 = 1;
}

   


then everything is fine .... : (

0 Likes
2 Replies
Anonymous
Not applicable

Have you tried this with different FX2LP samples i.e. just to isolate whether this is due to a chip level failure.

   

Please attach your project files here. I want to check if the compiler is optimizing out something.

   

Regards,

   

Anand

0 Likes
EvSt_281971
Level 2
First like received First like given
Level 2

I attach my project.

   

This project normal work.

   

Please, help me - how did 1us delay? In my project i make function delay_us, but this function don't work for me 😞

0 Likes