![]() |
![]() |
![]() |
|
|
|||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
|
|
Thread Tools | Display Modes |
|
|
(permalink) |
|
There could be many reasons for this. First thing may be baud rate. Or may be improper schematic.
Show your Micro's code and your schematic.
__________________
"There is no way to peace, peace is the way!" |
|
|
|
|
|
|
(permalink) |
|
If you are using Nigels tutorial schematic.
Remove the PIC. On the MAX232 junper pins 9 and 10 together. Use a terminal emulator on the PC. Now anything you type on the PC will come in on MAX232 pin 8 at RS232 levels. It will exit the MAX232 on pin 9 at TTL levels. Then go back into the MAX232 on pin 10 as TTL and exit on 7 as RS232 and go back to the PC. With this setup anything you type on the PC should show up on the PC screen. If it does your MAX232 and cable are OK. Remove the jumper and replace the PIC. EDIT: For this test baud rate and parity settings on the PC do not matter, but I suggest you use whatever you intend to use with the PIC.
__________________
search engine for electronic partsJunebug USB PIC programmer kit., USB Bit Wacker, 3v0's Homepage The 15 Minute Printed Circuit Board! (+drill time) Last edited by 3v0; 1st August 2007 at 01:56 AM. |
|
|
|
|
|
|
(permalink) |
|
Instead of using a MAX232, as serial ports are becoming rare on laptop's you might want to consider implementing a USB to serial chip. e.g FT232R or FT232BM
The drivers for these FTDI chips allows you to communicate to the device like any standard serial COM port. So the code you have already implemented will still work. Cheers Stolzie |
|
|
|
|
|
|
(permalink) | |
|
Quote:
Its still not working like this 3v0! Ok here is what I have going: Power is 5V On the DE-9.. Pins 1 & 4 & 6 are connected together. Pins 7 and 8 are as well. Pin 5 is going to ground on the MAX circuit. Pin 2 is going to Pin 7 of the MAX Pin 3 is going to Pin 8 of the MAX There is a 47uf by cap on Pin 16 of the MAX. Between pin 16 and pin 2 is a 22uf cap, + leg is on pin 2 On Pin 6 there is a 22uf cap going to ground, + leg is on ground side. Between pin 1 and 3 I have (2) 4.7uf caps in parallel, since I dont have (2) 10uf caps. + leg is on pin 1 Between pin 4 and 5 is one 10uf cap, + leg is on pin 4. and Pin 9 and 10 are jumpered together. Ground is on Pin 15. Vdd is on 16. That is exactly how mine is wired. The VB6 program: On the Form there is 2 txt boxes. txtRX and txtTX I then Copy and pasted this code: PHP Code:
When I press 'RUN' I try to type in the TX text box.. nothing shows up on the RX box. argh.
__________________
"Stick around" - Arnold Schwarzenegger in The Predator after impaling a soldier to a wood post 9vDC Guitar Pedal PSU PIC16F84a Game Module |
||
|
|
|
|
|
(permalink) |
|
I did not sort through the wiring. A schematic would go a long way here. The text version makes my head hurt.
Prior to getting into that lets make sure the PC is doing its job. Unplug the RS232 cable from the PIC. Type and you should see nothing. Short pins 2 and 3 on the RS232 cable (it is still plugged into the PC but not the PIC target). To do this you can makup an DB9 with a wire soldered between 2 and 3. With the jumper in place you should see what you are typing on the PC. If this does not work either you did not follow these instructions or the BASIC program has problems. Maybe flow control problems. Others may have talked about that.
__________________
search engine for electronic partsJunebug USB PIC programmer kit., USB Bit Wacker, 3v0's Homepage The 15 Minute Printed Circuit Board! (+drill time) |
|
|
|
|
|
|
(permalink) |
|
Are you sure you have connected RS232 cable on COM1?
A silly question...but sometimes people make this mistake.
__________________
"There is no way to peace, peace is the way!" |
|
|
|
|
|
|
(permalink) |
|
This tutorial from SparkFun Electronics might be useful to you.
http://www.sparkfun.com/commerce/pre...p?p=BEE-4-UART At the bottom of their main tutorial page, under the heading General PIC Tutorials, they have some other serial and UART related information. I apologize if it's too little too late, but perhaps it can be of some help for others. Last edited by TekNoir; 1st August 2007 at 05:08 AM. |
|
|
|
|
|
|
(permalink) | |
|
Quote:
When I short pins 2 and 3 of the serial cable It still does not work. Could it be my fire wall? It is on COM1 for sure. Why do we jumper 7 and 8? Why do we jumper 1 and 4 and 6? I know these are probably the lamest questions but it really will help me solve this. Does anyone have the VB6 program made? No need to go and make it Well I dont really understand! I am a very consious programmer.. everything in the VB appears to be right.. Fairly new computer.. COM port has never given problems.. worked with my edrum and programmer.. HMMMM
__________________
"Stick around" - Arnold Schwarzenegger in The Predator after impaling a soldier to a wood post 9vDC Guitar Pedal PSU PIC16F84a Game Module |
||
|
|
|
|
|
(permalink) |
|
Firewall generally doesn't block COM ports so I guess thats not the problem.
Try this project. Its a terminal program written in VB. http://www.programmersheaven.com/dow.../download.aspx
__________________
"There is no way to peace, peace is the way!" |
|
|
|
|
|
|
(permalink) |
|
what should the flow control be set at ?
it is on HARDWARE right now.
__________________
"Stick around" - Arnold Schwarzenegger in The Predator after impaling a soldier to a wood post 9vDC Guitar Pedal PSU PIC16F84a Game Module |
|
|
|
|
|
|
(permalink) |
|
It should be NONE. You don't require any hand-shaking in most cases.
__________________
"There is no way to peace, peace is the way!" |
|
|
|
|
|
|
(permalink) |
|
sweeeeeeeeeeet
I was just messing with the Properties window for MSCOMM and now it working! Input mode was set to Binary.. changed it to Text. Dont ask, heh. Ill try it with the MAX now.. Works. Ill try it with the PIC now.. Works! Thank you guys SOOOO much! This has given me so many more circuit ideas!! Next is USB i guess.. any recommend chips? See you.
__________________
"Stick around" - Arnold Schwarzenegger in The Predator after impaling a soldier to a wood post 9vDC Guitar Pedal PSU PIC16F84a Game Module |
|
|
|
|
|
|
(permalink) |
|
USB is pretty difficult to start with. Its not like Serial or parallel port. It requires lot of coding.
But if you use USB to Serial converter chips like FT232...things become much easier as USB coding is abstracted by using the DLLs supplied by FTDI. www.ftdichip.com
__________________
"There is no way to peace, peace is the way!" |
|
|
|
|
|
|
(permalink) |
|
Build a few projects with the RS232 serial first.
Then you may want to take a look at UBW (USB Bit Whacker) It uses a PIC18F with USB. It may not be the exact application you are looking for but it is fun to play with and quite inexpensive to build.
__________________
search engine for electronic partsJunebug USB PIC programmer kit., USB Bit Wacker, 3v0's Homepage The 15 Minute Printed Circuit Board! (+drill time) |
|
|
|
|
|
|
(permalink) | |
|
Quote:
Probably going to use RS232 with VB then JAVA then C++ before I go for USB.
__________________
"Stick around" - Arnold Schwarzenegger in The Predator after impaling a soldier to a wood post 9vDC Guitar Pedal PSU PIC16F84a Game Module |
||
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Latest |
| Visual Basic for Electronics Engineering Applications | ThermalRunaway | Electronic Books | 22 | 27th August 2008 07:40 PM |
| Serial Communication Interrupt in PIC Basic Pro | TheMaccabee | Robotics Chat | 5 | 12th April 2007 07:52 AM |
| K8055 USB Interface Visual Basic Help | Sudonon | General Electronics Chat | 6 | 11th September 2006 12:24 AM |
| visual basic program for parallel port interface | group_x3m | Micro Controllers | 5 | 26th May 2006 01:48 AM |
| Newcomers, please read! (PIC regarded) Upd. 0xD | Jay.slovak | Micro Controllers | 0 | 17th April 2005 01:04 PM |