You are here

How do you edit Component Blocks? | Cypress Semiconductor

How do you edit Component Blocks?

Summary: 2 Replies, Latest post by davemullenix on 17 Mar 2010 02:17 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
davemullenix's picture
6 posts

Hi all,

I just got my PSoC FirstTouch Starter Kit and I'm blown away at what the PSoC chips can do! It's like having an analog workbench plus a powerful microprocessor on the end of your USB cable.

Can anybody tell me how I can modify the "Component Block for LED Control" shown in the TopDesign.cysch window of the BubbleLevel project that comes with the FirstTouch kit? It comes with just seven wires connected to the control register and wire 3 is connected to two LEDs. This gives you a two LED wide dot when the board is exactly level, but I want to change that.

I can right click on the LED_Control_Reg and change the number of bits from 7 to 8 and ditto with the inverter between the LED_Control_Reg and the LEDs, but how do I change the wires? I want to run an 8 wire bus with each wire controlling a single LED.

I'm hoping for a graphical way to do this, but if I have to dig into files, how do I do that?



yfs's picture
Cypress Employee
102 posts

You need to...

1. Increase the size of the control register to 8

2. Draw a wire from the new terminal to the bus (that 's the thick wire labeled [6:0])

3. Name the wire "[7]"

4. Change the width of the both buses (before and after the inverter) to [7:0]

5. Change the size of the inverter to 8

6. Change the bus to dPins_MSB to be [7:4]

7. Change the C code from:

if(BubbleValue > 6)


BubbleValue = 6;



if(BubbleValue > 7)


BubbleValue = 7;


This will give you an extra LED when you tip it one direction. I attached a picture...

Note that the wiring changes are done by right-clicking and selecting "Edit Name and Width".

-- mgs

davemullenix's picture
6 posts

Thank you! I just followed your instructions and it worked the first time!

I really love the new PSoC 3 chips. I've been waiting for something like this for twenty years!

Now to play with it some more ...

Log in to post new comments.