CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Help please when i transmit data to PC i receive unknow form

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
helmi03



Joined: 12 Apr 2011
Posts: 7

View user's profile Send private message

Help please when i transmit data to PC i receive unknow form
PostPosted: Sat Apr 16, 2011 1:43 pm     Reply with quote

hi i have a problem when i transmit data from my pic16F877 to the pic.
I receive a unknown format of data. This picture show my terminal and the virtual terminal receive

http://img859.imageshack.us/i/shema.png/
temtronic



Joined: 01 Jul 2010
Posts: 9229
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Apr 16, 2011 2:00 pm     Reply with quote

Is this a REAL circuit or just a simulation ?

We'll need to see your code, compiler version, and PIC type.

If it's all 'virtual' ie: NOT real hardware, I can't help. NO simulator works correctly and I will not waste my time trying to debug 'virtual' code on a 'virtual' machine.
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Sat Apr 16, 2011 7:15 pm     Reply with quote

One obvious error in the schematic is the connection of C3. This is now in series with the line to ground for the MAX232. Just remove it, in simulation you can assume the power supply to be perfect. Make VS- a direct connection to GND.

Other possible errors are hard to tell without an example program and compiler version number.
temtronic



Joined: 01 Jul 2010
Posts: 9229
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Apr 16, 2011 7:48 pm     Reply with quote

arrgh...simulators..

Looked at the 'schematic' and it's NOT a real circuit, just a simulation..

Glaring error on the DE-9 connector. It's wired wrong (if I assume a 'straight though cable as nobody makes there own these days), so a real PC would never see data...pins 2 and 3 wrong, 5 (ground) NOT connected to PIC ground, though the simulator doesn't care, I do, and more importantly the PIC does! Guess the simulator doesn't have a 'design rule check' routine.

As for the PIC, no xtal, xtal caps, pullup on *MCLR, power pins aren't connected.. Again, the simulator doesn't care, but the PIC in the real world does !

MAX232 needs another cap...org. design has 4...always 4...

That's some of the problems with simulators...you can 'wire' the PIC up on the screen and it works(?) even though in the real world it'd just sit there looking at you !!!

I wonder how many hours(days ?) are wasted trying to debug a simple circuit like this.2 chips,3 caps one connector,10 lines of code?Guess I'm cynical after 35+ years of making a living in the field.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group