Problem with the parallel port

Problem with the parallel port

by Sylvain Jean-Roger Migaud -
Number of replies: 6
Hello,


I have an issue with the parallel port provided in the slides, it's probably something stupid but i already lost far too much time with that. I can only make it work in one direction, I can read with the Avalon bus but not write.

If you look on the simulation, it seems to me that all the necessary signals are properly setup but for some reason ParPort doesn't take the iRegPort value.

Thanks for your help,

Regards,

Sylvain



In reply to Sylvain Jean-Roger Migaud

Re: Problem with the parallel port

by Sahand Kashani-Akhavan -

It's hard to say without any more information. How do you know you are reading correctly? Do you get back a value you are expecting?

Could you provide a screenshot of the simulation you're talking about? You can also check with the signaltap logic analyzer to see if the internal register's value is being modified when you write.

In reply to Sahand Kashani-Akhavan

Re: Problem with the parallel port

by Sylvain Jean-Roger Migaud -

Sorry, there was two pictures but they didn't went through in the end apparently

Here they are !

Attachment Capture d’écran du 2020-03-26 19-47-13.png
Attachment Capture d’écran du 2020-03-26 19-48-59.png
In reply to Sylvain Jean-Roger Migaud

Re: Problem with the parallel port

by Sahand Kashani-Akhavan -

I don't see anything wrong in the simulation. You are:

  • Reading register 1 (RegPin) and you're reading back 10101010 (which is correct as that's the data on the input pin)
  • Writing register 2 (RegPort) with 01010101, and we see that the write is being performed to the register.
  • Writing register 0 (RegDir) with 11111111, and we see that the RegDir register is changing to 11111111 afterwards.

Can you explain what you're expecting to see?

In reply to Sahand Kashani-Akhavan

Re: Problem with the parallel port

by Sylvain Jean-Roger Migaud -

Thanks for your answer !

There must be something wrong with my understanding of how the parallel port should be working, I was expecting to see 01010101 on ParPort because the way the registers are configured, I am writing on ParPort with the Avalon bus (write register 0 is all 1)

The value is appearing in iRegPort and given the code in the screenshot, it seems to me ParPort should take the iRegPort value.

Thanks for your help,

Sylvain


In reply to Sylvain Jean-Roger Migaud

Re: Problem with the parallel port

by René Beuchat -

Hello,

please, provide your tb file too. Specify what you expected.

As Sahand explained, you write something on the ParPort, and if you put the direction as output this information will be put on the pins.

We can see that Monday during the lab.

Best.

RB

In reply to René Beuchat

Re: Problem with the parallel port

by Sylvain Jean-Roger Migaud -

Hello,

Thanks for your explanations, I had some computer issues in the past week but it's all good now and you were right, i wasn't understanding properly how the parallel port was supposed to work, i can see the GPIO switching as expected now !

Regards,

Sylvain