RS232 & PIC 18F452

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
sox
Posts: 2
Joined: Sat Apr 12, 2008 12:35 pm

RS232 & PIC 18F452

Post by sox »

Hi I am looking for some help using the rs232 e block (eb015), i am using a PIC 18F452 and am looking to recieve an ASCII input from the rs232 which is connected to an access control system. Firstly i have assumed that the rs232 eblock needs to be connected to PortC, is this correct or can it be connected to any other port? Secondly i am having trouble setting the jumpers to the correct settings as the access control system which is sending the ASCII codes uses pin 2 for Tx and pin 3 for Rx. I am not using CTS or RTS so i currently have the jumpers set at D & 2. However it seems that i cant recieve the data from the access control system, any ideas would be much appreciated.

Thanks

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: RS232 & PIC 18F452

Post by Steve »

That chip has the UARTs Tx and Rx lines on C6 and C7. Therefore, you will need to connect the E-Block to port C and use jumper positions C and 2.

You can use this E-Block on any port/pin, but if you did you would need to develop your own bit-bang code implementation of RS232.

sox
Posts: 2
Joined: Sat Apr 12, 2008 12:35 pm

Re: RS232 & PIC 18F452

Post by sox »

thanks i have cracked the rs232 connection, but am now struggling trying to set up a custom interrupt for the rs232, does anyone know where to start with this.

sox

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: RS232 & PIC 18F452

Post by Steve »

there are some other threads on this forum that have dealt with this. Have you tried searching the forums?

Post Reply