The debug statement also gives garbage
Mark
The debug statement also gives garbage
Mark
With Serout you need to include this at the top of your code:
Include "modedefs.bas"
N2400 will invert the bits so you can just use a resistor straight onto the serial port.
If you have a max232 then this inverts each bit and you want to send it in True T2400
Regards
Sean.
Last edited by sean-h; - 10th February 2006 at 19:49.
Sean As I said in my note I have the modedefs in there and it compiles 100%
I have also tried it direct with 1k resistors and via an interface and i get garbage in all cases.
Mark
With the debug command I have also tried to use 4800 Bps and both inverted and non inverted with no luck still garbage.
Mark
Mark you say you are using VB.
Have you simply ran up hyperterminal, set the com port to 2400 8 n 1, hit retunr to open port and then looked for the data, this will illiminate another step if the data is clear and then it has to be the VB side of things.
Regards
Sean.
I have used my own comms software, hyperterminal etc plus vb (gives me bit stream access) and nothing works.
I have this nagging feeling that this is the comms port to be honest or rarther the wrong caps on teh max232cpe level converter I have built several of these and have used 20uf instead these are proper maxim devices as well
but I have this feeling that it may be possible that the caps are wrong as the ICD does not connect either mmmmmm off to replace the caps I think.
But I have also tried without the interface as well and get exactly the same datastream ... The operating system is irrelevent but I have used W2k and OS X I have windows 98 so I may give this a try, I also need to check the fifo buffers for the W2K box and see if these are not messing me up...
The vaio machine I am using does not want to talk to some devices sometimes and maybe this is the root, of course it could be guess work as the Mac is rock solid.
Mark
Its not the serial ports
b var byte
include "modedefs.bas"
for b = 1 to 100
SEROUT PORTB.6,T2400,[#b]
next
Counts as you would expect, on the pic simulator with the code complied for the F84 and simulator set for F84 works great, set compiler to 877 and simulator to the 877 it delivers garbage.
This is telling me that there may be something wrong with my basic compiler
in the include files ?????
this should give 12345 etc but give junk with the 877 selected
Mark
Bookmarks