- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi all,
has anybody seen a problem where bit 7 received for incoming characters appears wrong? using a niosii 50MHz and adding a uart with 9600 8,n,1 hooking it up to Hyperterminal on windows pc with the following running on the nios... FILE *fp; fp = fopen(UART1_NAME, "r+"); if(fp == NULL) { printf("error opening dev/uart1\n"); } else { while(1) { printf("%c", getc(fp)); } } looking at the console in the IDE I see the following... (any character I type sometimes appears with bit 7 set to 1 and thus the garbage character)? aaáaáaáa eeåeåeåeå iiéiéiéiéiéiéiéiéiéiéiéiéié ooïoïoïoïoïoïoïoïoïoïo uuõuõuõuõuõu qqñqñqñqñqww÷w÷w÷w÷w÷w÷eeåeåeå there is even some pattern to it..... if I press a "new" character i get it 1st two taps on the keyboard - after that the bit 7 received by the NIOS toggles for each one? Thanks for any advice!!! Regards, JoeLink Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This looks suspiciously like the UART baud divisor is incorrect. The divisor is calculated based on the clock speed you enter into SOPC Builder at system-generation-time. You might make sure that your SOPC Builder system is re-generated & quartus project re-compiled (to ensure that the baud divisor is properly set in the FPGA), and then that your oscillator/PLL is driving 50Mhz, not 50.02 or 49.98....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Nios Uart is fine! The divisor is set correctly,etc.
The problem is with the HyperTerminal program. While I can send entire text files down to the Nios without a problem, that behaviour I mentioned with the same characters still occurs..... crazy. I tried an old DOS terminal program in a DOS-box and it behaves fine!! Thanks for your attention though! http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif ps. any recommended Terminal programs out there for Windoze?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How often will you be talking to your system via the uart? If the answer is alot you may want to create your own software to talk to it. Then you can make it do whatever you want (like file I/O for example).
What were your connection settings in Hyperterminal? Usually that program is stable and this sounds bad. If your bit 7 is set then I would expect those funny characters (part of the extended ASCII set).- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I recomend TeraTerm Pro. It is free, can be used as serial and network terminal (SSH, ...) and it works.
http://www.ayera.com/teraterm/ (http://www.ayera.com/teraterm/) have fun- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, that teraterm program work okay.
For the record, I have tried my experiment several times with hyperterminal - setting it for 9600, n,8,1 with no flow control,etc..... (same settings as with the DOS program and this new teraterm).... also no terminal emulation (TTY) is selected. As I say - complete files can be transferred etc without a problem - only by tapping the same key (tap as fast or slow as you like!) will give the toggling bit 7 after the first two new characters.....! Thanks for all the help. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page