- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Solved! Go to Solution.
- Labels:
-
PSoC 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, PSoC1s are a bit more complicated, see the configuration ot the modules.
The timer is needed to generate the clock for 9600 baud for the UART. You get Tx and Rx at pins P0_0 and P0_1 resp. Voltage at those pins is not compatible with standard RS232 serial interfaces, those have a level of +- 12V which might destroy your PSoC chip. You would use a level translator like MAX232.
See attached project.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I will eventually figure out how to move this project to a newer chip. (Or have to pay someone to help me)
But for now all I need is a little Uart communication. That shouldn't be to hard right?
Bobgoar is that example PSoC1 or PSoC5?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, you can't. For PSoC1 you need PSoC Designer 5.4. And: PSoC1s are not obsolete.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you please post your complete project, so that we all can have a look at all of your settings. To do so, use
Designer->File->Archive Project
and attach the resulting file.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, PSoC1s are a bit more complicated, see the configuration ot the modules.
The timer is needed to generate the clock for 9600 baud for the UART. You get Tx and Rx at pins P0_0 and P0_1 resp. Voltage at those pins is not compatible with standard RS232 serial interfaces, those have a level of +- 12V which might destroy your PSoC chip. You would use a level translator like MAX232.
See attached project.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Awesome Bob Thanks so much!
Few questions,
1. can you explain how you set the speed? on my serial monitor 9600 did not work. 19200 worked.
2. can the timer be removed and use a internal clock? So that I am only using 2 user blocks for serial? 2 left for other things?
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok I think I figured out the speed.
19200 (The speed desired)
x8 (form datasheet)
153,600 (Needed clock speed)
24Mhz / 153,600 = 156
156 (Period on the timer)
Ok If thats correct and I want to change it to 9600 why wont it let me change the period parameter to anything over 255?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also think i figured out how to remove the timer user block.
I set V3 up the same as the timer block and used that for my clock in. seams to work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Because it is an 8 bit timer. When you need to change the frequency you must find a combination of the input clock and the period of the timer.
If all this is experimental only, I would strongly recommend to use a PSoC4 or PSoC5 device. There are prototype kits and evaluation boards available for small money.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Generally speaking there are two ways to convert integers to string using C Language:
- the macro itoa()
- the function sprintf()
from which the latter is quite more flexible and accepts a format string for the wanted conversion.
Bob