I faced several problems while working on the PIC to PC communication portion of the programming. Here are some of the major issues with my solutions:

 

1. Hyperterminal not found.

It seems like Windows 7 does not come with Hyperterminal software. Pretty simple fix: go to the Dropbox link I attached below and download hypertrm.dll and hypertrm.exe. Double clicking hypertrm.exe should start Hyperterminal. If not, try moving these files into C:\Program Files\Windows NT and try again.

2. Computer does not recognise RS232 connection.

First check if you actually installed the driver software that came with the cable or is provided on this website (Resources -> Lab Exercise -> download RS232 zip).

If you tried this and it still doesn't work, you're probably running 64-bit Windows 7 like me.

The drivers provided seem to be incompatible with 64-bit Windows 7 so download Serialio.com_PL2303_XP_Vista_32_64.EXE from my Dropbox. Install this and RS232 should be recognized. If this doesn't work, perhaps try PL2303_VISTA_32_64_332102.exe. Seems to depend on computer since my laptop worked with one but not the other, while my desktop worked with both.

3. Got it all connected but Hyperterminal is reading weird symbols.

First of many reasons for this problem is that the USART communication code is in a different file of the project. This is easily fixed by moving all USART related code to your main code (where you define all CONFIG etc). I know this is weird and I have no idea why it is this way, but moving the code changed the behaviour considerably for me.

Second reason may be that the PIC is sending too much information too quickly. This can be checked by sending a byte and increment it then send that byte, etc. At some point, Hyperterminal will start receiving understandable symbols such as 123456. If the received symbols don't seem to have a pattern (e.g. 37Jpts!!~!@$%^&^) then the info is likely being sent too quickly. Try adding a short delay after each write to the USART TXREG. 

Third reason may be that you're sending the wrong byte to represent the symbols you want. This is most likely because of different encoding for symbols, i.e., LCD uses ASCII but Hyperterminal (at least mine) uses ANSI.

Dropbox with relevant software.

Views: 270

Comment

You need to be a member of Personal Mechatronics Lab to add comments!

Join Personal Mechatronics Lab

© 2017   Created by PML.   Powered by

Badges  |  Report an Issue  |  Terms of Service