Control Registers - Direct Mode

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

cross mob
lock attach
Attachments are accessible only for community members.
jofic_334026
Level 3
Level 3
First like received
     I guess I don’t understand control registers the way I thought I did.  I’ve attached a very simple project.  When I write a ‘1’ to the control register I expected it to go high and stay high.  However, it seems to go high for one clock cycle and then slowly decay to 0.  I would expect this behavior if the control register was set to ‘Sync’ or ‘Pulse’ but I have it set to ‘Direct’.  What am I not getting?   
0 Likes
5 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I am not quite sure, but you overload the output of your LED connection. The pin is only able so source 4mA and you have connected it so that it has to deliver more than 8mA when using 3.3V. At 5V it would be even more than 16mA

   

Your assumption that the pin has to stay in high state is correct, so the reason must be elsewhere (toasted pin, bad supply etc...)

   

 

   

Bob

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

You have the control reg pin tied to the processor reset pin,

   

looks like you must be resetting processor. But its stated

   

as an aux reset pin, and its functionality is not checked off

   

in system tab, *.cydwr file A bug ?

   

 

   

Regards, Dana.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Your LED pin is NOT overloaded per se. Its a P channel

   

output and will inherently be fairly low current due to

   

source bulk effect and lower mobility.

   

 

   

Iled = ( Vdd - Vledth ) / 200 =~ ( 5 - 1.5 ) / 200 =~ 17.5 mA, if

   

the P channel was a perfect switch, which it is not.

   

 

   

So I would not worry about overload unless you want to do a number

   

of pins then you have a port I/O rail limitation.

   

 

   

   

 

   

Regards, Dana.

0 Likes
jofic_334026
Level 3
Level 3
First like received

It was an o-scope issue.  I had it on AC coupling. Doh!

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Been there, done that, will continue to do that, welcome to

   

my club.

   

 

   

Regards, Dana.

0 Likes