cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC Creator & Designer Software

RoAl_1309171
New Contributor II

Hi,

I'm trying to get my project to work and one of the problems is that data I write to a control register is not showing up on the pins the register is connected to (called DataOut in the project). While trying to figure it out, I noticed that my AddressBus and DataBus pin components don't show the pin assignments for each of their pins, even though all the pins are locked. They show the assignment for one of the pins, though.

I've attached the project. Can anyone advise me as to what I've done wrong? This is my first PSoC project, so it may very well be a N00B mistake. (There's debugging stuff in this project, like hard-coded writes to DataOut_Control and an OR gate forcing the DataBus' OutputEnable high. They're just part of my efforts to get this thing working.)

Thank you,

  Bob

0 Likes
Reply
1 Solution
DheerajK_81
Moderator
Moderator

I went through your project. The DataBus pins which are read by the StatusRegister (DataIn) need to be configured as Strong Drive. I have modified the project to use one of the pins of the ControlRegister (DataOut) to blink an LED to demonstrate that writing to the ControlRegister works correctly,

Please find the modified project attached.

I didn't quite understand the pin assignment problem you were facing. You can manually assign whatever pins you like by clicking the dropdown. Please elaborate on the issue.

Regards,

Dheeraj

View solution in original post

0 Likes
Reply
3 Replies
DheerajK_81
Moderator
Moderator

I went through your project. The DataBus pins which are read by the StatusRegister (DataIn) need to be configured as Strong Drive. I have modified the project to use one of the pins of the ControlRegister (DataOut) to blink an LED to demonstrate that writing to the ControlRegister works correctly,

Please find the modified project attached.

I didn't quite understand the pin assignment problem you were facing. You can manually assign whatever pins you like by clicking the dropdown. Please elaborate on the issue.

Regards,

Dheeraj

View solution in original post

0 Likes
Reply
RoAl_1309171
New Contributor II

Thanks for the answer Dheeraj.

Setting strong drive makes sense. Though at start-up, I want the pins to be hi-Z, and then I only want strong drive when I'm driving them as outputs. So it seems a little confusing that the Drive Mode is set on the pin's General tab. Shouldn't there be a drive mode on the Input tab (for selecting pull up, pull down, or neither) and another drive mode on the Output tab (for strong, open drain, etc.)? If a pin is both input and output, how should I be switching drive modes? In code through the API? If so, that makes the Output Enable line a lot less useful.

As for the pin assignment problem, I'm attaching a screen shot of the DataBus pins below. Notice that the pin at the bottom says it's assigned to 12[5]. The others don't say what pin they're assigned to. According to the docs, if a pin is locked, it should show its assignment. All of my DataBus pins are locked, yet only one is showing its physical pin number.

- Bob

databus.jpg

0 Likes
Reply
DheerajK_81
Moderator
Moderator

Please note that when you have both Digital Input and Digital Output enabled, the only thing that determines if the pin is input or output are the drive modes and if the input buffers are enabled etc. Since it is the same hardware, you cannot have drive modes options available in both input and output tabs. The drive mode applies to both.

In firmware, you can change the drive modes whenever necessary (Refer to API Pin_SetDriveMode in the component datasheet). So, begin with High-Z as per your requirement. Whenever you want to drive the output, change the drive mode to Strong Drive. Output enable only allows the signal to pass through based on if it is enabled or not, nothing else.

Regarding the pin assignment, maybe try changing the pin mapping to Contigious and then lock the pins, you should be able to seem them in the schematic thereafter.

pastedImage_1.png

Regards,

Dheeraj

0 Likes
Reply