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 support@ccsinfo.com

Vinculum vdip1 on second serial port of 18f8722 giving grief

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



Joined: 05 Nov 2008
Posts: 18

View user's profile Send private message

Vinculum vdip1 on second serial port of 18f8722 giving grief
PostPosted: Sat Sep 12, 2009 3:53 am     Reply with quote

Hi I am using the CCS supplied Vinculum drivers that come with the USB Master dev kit.

And they work great if I hook everything up to use the first serial port for STREAM=USB and assign the CTS RTS lines etc.

But I want to use the VDIP1 module on one of Fred Eady's Frame Thrower II boards and UART 1 is already wired for console I/O, so I want to use the second uart for the VDIP1.

I have made the following alterations to USBMaster.h and would assume that swapping the STREAMS and Baudrates all would be well but it isn't.

I have verified the VDIP module also on a PC comm port and flashed it to the latest firmware. So I can discount the module.
Code:

#ifdef EDTP_TT_2_8722
// Serial Library defined for User stream - Used with SIOW
#use rs232(baud=9600, UART2, stream=USB, ERRORS)
// Serial Library defined for USB stream - 18F67J10 to VNC1L chip
#use rs232(baud=19200, UART1, stream=USER, ERRORS)
// Generic pin layout
   #define USB_RTS   PIN_D2
   #define USB_CTS   PIN_D3
   #define USB_RESET PIN_E0
   #define USB_PROG  PIN_F2
#endif

Thanks

Greg Omond
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Sep 13, 2009 3:56 pm     Reply with quote

Quote:

I would assume that swapping the STREAMS and Baudrates all would be well but it isn't.

Post your compiler version.
gomond



Joined: 05 Nov 2008
Posts: 18

View user's profile Send private message

PostPosted: Tue Sep 15, 2009 2:44 am     Reply with quote

Hi the compiler version is PCWHD v 4.096

Thanks.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Sep 15, 2009 2:02 pm     Reply with quote

I installed vs. 4.096 and compiled the test program shown below.
The ASM code in the .LST file looks OK for the UART2 stream (USB).
It's talking to all the correct registers. The constants loaded into the
registers look correct.
Code:

#include <18F8722.h>
#fuses XT,NOWDT,PUT,BROWNOUT,NOLVP
#use delay(clock=4000000)
#use rs232(baud=19200, UART1, stream=USER, ERRORS)
#use rs232(baud=9600, UART2, stream=USB, ERRORS)

//===========================================
void main()
{
char c;

c = fgetc(USER);
fputc(c, USER);

c = fgetc(USB);
fputc(c, USB);
   
while(1);
}
Guest








PostPosted: Thu Sep 17, 2009 3:19 pm     Reply with quote

Thanks .....

All fixed it was an issue with the sp233/max233 level translator.
They appear extremely fragile I have found that the receive side of the chip is very intolerant and blows easily.

this was causing me to believe that the software was not working.

because the fault occurred on three separate boards.
I have since McGyver'd a "futurlec" translator board to it and the problem is solved.

###########################
A good tradesman never blames his tools?
###########################
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