PDA

View Full Version : Need help with HSER on the 16F747



allanb
- 17th September 2013, 00:31
I have been trying to implement HSERIN & HSEROUT on the 40-pin 16F747. I still use PicBasic Pro 2.6.

I have gotten successful I/O tests when using DEBUGIN & DEBUGOUT on PortA.1 and PortA.2.

This leads me to believe that there may be some obscure setting that I am omitting which the code operating behind the DEBUG commands gets right.

I have combed the docs for the 16F747 and can't think of anything I left out. It has quite a few functions multiplexed on it's 40 pins though.

I have included my rather short test code as a ".txt" file for anyone who might be interested in critiquing my work7083.

HenrikOlsson
- 17th September 2013, 06:35
Hi,
Two things that springs to mind:
1) You say it's working with DEBUG/DEBUGIN on PortA. I'm just making sure that you're not expecting HSEROUT to work on those same pins.
2) The USART sends and receives the data "true" while the PC (since it's got a level translator/inverter) sends and receives the data inverted. When using the USART you need a MAX232 etc on your board, do you have that?

/Henrik.

allanb
- 18th September 2013, 04:28
With HSER I am using the hardware pins TX/RC6 and RX/RC7.
I have a hardware board that I have been using for years that changes the RS232 to TTL. It works flawlessly with the 16F628A.