Yes, you need DEBUGIN and DEBUG defines.
I am giving you this stuff from memory and evidently I have forgotton something. When I get back to the shop tonight I will test it and see what I am missing.
Maybe someone will fill in my blanks
Yes, you need DEBUGIN and DEBUG defines.
I am giving you this stuff from memory and evidently I have forgotton something. When I get back to the shop tonight I will test it and see what I am missing.
Maybe someone will fill in my blanks
Dave
Always wear safety glasses while programming.
The send code
The receive codeCode:DEFINE DEBUG_MODE 1 ' Debug sending INVERTED serial data DEFINE DEBUG_REG PORTB ' Debug Port = PortC DEFINE DEBUG_BIT 3 ' Debug.bit = PortC.4 DEFINE DEBUG_BAUD 2400 ' Default baud rate = 2400 DEBUG "9",DEC 3,$d,$a
I just ran this in real life, it works.Code:DEFINE DEBUGIN_MODE 1 ' Debug sending INVERTED serial data DEFINE DEBUGIN_REG PORTB ' Debug Port = PortC DEFINE DEBUGIN_BIT 4 ' Debug.bit = PortC.4 DEFINE DEBUGIN_BAUD 2400 ' Default baud rate = 2400 DEBUGIN [WAIT("9"),DEC NET]
Sorry for giving it wrong before.
Dave
Always wear safety glasses while programming.
IT WORKS !!!
WOOOOOOHOOOOOOOOOO you ROCK ! :-)
Thank you thank you thank you :-)
By the way that memory of yours was pretty damn close :-)
Seems inverted mode was needed ?
What are the $d and $a for in the line below by the way ?
And now for HSERIN and OUTCode:DEBUG "9",DEC 3,$d,$a
A few questions first ..
1. With HSERIN and OUT , is it a necessity to use the onboard TX/RX pins , in my case PORTC. and PORTC.7 ?
2. Is it pretty much a case of replacing the debug lines with HSERIN as you said in a n earlier posting ?
Thanks again Dave
Dennis
Hello Dennis,
I don't know if Dave is online now, so I thought I'de jump in and answer your 2 questions real quick...As Dave has helped me immensely on the same serial in out topic...Thanks again Dave!
1) The $d $a is a "Carriage Return - Line Feed" terminator
2) Yep, the hardware ports have to be used for HSERIN/OUT.
Hope I helped and didn't offend you Dave
Enjoying this thread, and learning from it too!
Chris
Thanks so much :-)
I really appreciate it :-)
I haven't tried it yet as I was awaiting Dave's instruction and possibly a code snippet.
The reason for this is that I like to having a working reference first and then experiment.
I have learned that by doing the wrong things first you battle even more and as the late nights roll by you find your concentration span dwindling more and more no matter how excited or motivated you are.
Not only that, you also find it's so frustrating and de-motivating when things just don't work and you'd like to get on with the next step but you can't because something you have done incorrectly (something as small as a character in the wrong place) is holding you back.Even if someone just points you to a document or flames you for putting the code in the wrong place without the code tags. You learn from this ..logical baby steps count !
It is so nice to have the chance to be involved with such a helpful community who share a common interest. I long for the day when I too have strong enough 'code eyes' and experience to also help others here :-)
Thank you all !!
Kind regards
Dennis
This is a community effort, the more giving the better.Hope I helped and didn't offend you Dave
And it is kinda hard to offend me anyways
yup, the DEBUG and HSER syntax is pretty much the same. The DEFINES are different and like Chris said the hardware pins have to be used.
Earlier in this thread I gave an example of using HSER with out DEFINES but for most cases I do use them. Start that way.
If are are going to communicate with a PC and/or some other things an inverter setup is needed, RS232 chips are mostly used for this.
There are some calculations needed for the DEFINES and I cheat by using this
http://www.picbasic.co.uk/forum/showthread.php?t=4994
I am not at my machine again and I learned my lesson about going from memory so no snippets from me at this time. Chris??? Do you have one to get him started???
Dave
Always wear safety glasses while programming.
Dave ..
Thanks again, but fading memory is better than no memory ( lol or is it ?)
So even if it's wrong it will send me hurtling off in the HSER direction on a voyage of discovery and when I'm truly stumped I will ask for assistance then and only then !
Kind regards
Dennis
Bookmarks