??? 07/10/09 13:21 Modified: 07/10/09 13:22 Read: times |
#167013 - Use 2 PC's to test comm's Responding to: ???'s previous message |
I wouldn't even connect to a micro at first... Test each section individually.
Start developing with more known factors (with less unknown factors) ==================================================================== 1st I would connect two PC computers via serial 1st. Use a cross over serial cable (null modem cable). i) Both PC's running a serial terminal programs like hyperterm or TeraTerm or Bray terminal Both set with the right serial baud rate etc Keystrokes on one PC should echo on the other.. ==> This proves that known hardware, serial ports and cables are working Next ii) PC a) Run a terminal program PC b) Run your R&D development VB6 serial program Hence you are dealing with only 1 unknown ..... you VB6 code Next iii) It should be easy to write the VB6 code to transmit some ASCII serial data that can display on the PC running the terminal program. ====> This proves that known hardware, serial ports and cables are working AND VB6 Tx is working ! Next iv) Develop the VB6 serial receive code. If things break or don't work repeat steps i) ii) iii ) to see where the fault lies ====> This proves that known hardware, serial ports and cables are working AND VB6 Tx and is working ! Next ======================================================================= Micro code development ======================== Connect PC serial port to the micro (don't forget the correct straight through serial cable and RS232 level converter IC' the micro) i) Get your micro to send Tx ASCII data to a PC computer running a terminal program (with the write baud rate and settings etc) ===> This proves that known hardware, serial ports and cables are working AND Mirco serial Tx is working ! Next ii) Get your micro to receive ASCII to a PC computer running a terminal program... Keystrokes on the PC terminal program should show action as received on the micro This proves that known hardware, serial ports and cables are working AND Micro serial Rx is working ! Next ============================ Application : VB6 <---> micro ================================= By doing the items above step by step you are creating the building blocks for the application Now you can start writing the VB and micro code for the application...... knowing that if things don't work.... you can debug you application by going back through the steps above. Also see http://www.8052.com/faqs Joe **** Sometimes the longest path in development leads to the shortest development time **** |
Topic | Author | Date |
serial port in vb | 01/01/70 00:00 | |
In VB | 01/01/70 00:00 | |
exmple pls | 01/01/70 00:00 | |
Rule #1 in Serial - Always Test Tx 1st | 01/01/70 00:00 | |
Use 2 PC's to test comm's | 01/01/70 00:00 | |
As I described... | 01/01/70 00:00 | |
thanks. i solve my problem | 01/01/70 00:00 | |
Guidelines | 01/01/70 00:00 | |
In Theory | 01/01/70 00:00 |