Searching \ for '[PIC]: PIC16F628' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=16F
Search entire site for: 'PIC16F628'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: PIC16F628'
2002\09\10@230101 by Salah

flavicon
face
Hi list!
 would you tell me what is wrong with the following code please !

***************************************************
#include <16F628.h>
#include <stdio.h>
#fuses INTRC,NOWDT,PUT,NOPROTECT,NOBROWNOUT,NOLVP,NOMCLR
#use fast_io(A)
#use fast_io(B)
//#use fast_io(C)
#use delay(CLOCK=4000000)
#use rs232(baud=9600,xmit=PIN_A7,rcv=PIN_A6)

void Ini(void);


void main()
{

 Ini();
while(1)
{
  printf("\nTest ");
}
}


void Ini(void)
{
  port_b_pullups(TRUE);
 setup_timer_1(T1_DISABLED);
 setup_timer_2(T2_DISABLED,0,1);
 setup_vref(FALSE);
 setup_comparator(FALSE);

 set_tris_a(0x00); //All OutPut
 set_tris_b(0x00); //All OutPut
}
************************************************

I am just trying to use RA7,RA6 instead of RB1,RB2  for the serial
communication .
any comments,ideas please?

Best Regards,
Salah.

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\09\11@005313 by Dale Botkin

flavicon
face
Try standard_io mode for port A.  I have never found a real need for
fast_io mode.  Just a guess, but commenting out that one line may well
solve your problem.

Dale
---
We are Dyslexia of Borg.
Fusistance is retile.
Your ass will be laminated.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\09\11@022254 by Peter nicol

flavicon
face
Hi Salah,

Sorry but I do not under stand "C" too well, but if you are using the in
built  SCI (Serial Communications Interface) you can not change the pins out
as this is a hardware device.

Yes it would be nice to use the ISP connector for serial port but it is not
going to be easy...

The only way to use pins RA6 & 7 would be to write a bit banging routine,
this will require a lot more programming, use a lot more memory, probably
need to use interrupt routines and a timer, lot easier to use RB1 & 2.

Regards

Peter.
{Original Message removed}

2002\09\11@120951 by =?iso-8859-1?Q?F=E1bio_Pereira?=

flavicon
face
Hi Salah:

Maybe you could set your fuses configuration to INTRC_IO .
Your are using INTRC config wich doesn't release the RA6 and RA7 for I/O ...
Maybe that's your problem.
I used many times the serial routines of the CCS compiler in many diferent
pins and it always worked ok. As stated in the CCS compiler manual , the SCI
will be used only if you assign the SCI pins.

Good luck

Fabio Pereira

{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...