Author Topic: quick question  (Read 1435 times)

0 Members and 1 Guest are viewing this topic.

Offline MahmoudTopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Helpful? 0
quick question
« on: December 12, 2011, 05:42:52 PM »
does 12f629 or 12f675 have serial communication ?
and what are the gp terminals?
« Last Edit: December 13, 2011, 06:22:28 AM by Mahmoud »

Offline Gertlex

  • Supreme Robot
  • *****
  • Posts: 752
  • Helpful? 23
  • Nuclear Engineer · Roboticist
Re: quick question
« Reply #1 on: December 12, 2011, 07:27:08 PM »
Please either use google, or give links to what you're talking about.
I

Offline MahmoudTopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Helpful? 0
Re: quick question
« Reply #2 on: December 13, 2011, 06:22:06 AM »
i mean pic 12f629(microcontroller) has serial communication or not
and how we use this pic what are the terminals that they have
can also we use mikrobasic to program it
« Last Edit: December 13, 2011, 06:27:05 AM by Mahmoud »

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 98
Re: quick question
« Reply #3 on: December 13, 2011, 06:15:17 PM »
Did you download and read the data sheet from Microchip?
The very first page of the data sheet will outline the features.

And even if serial (UART) is not supported in the hardware of the PIC you can easily do serial with code (bit banging). Microchip also has quite a number of application notes with code and a few cover serial.

So the direct answer is that these two PICs do not have serial hardware but I have done serial in code with both of these PICs.

Do some googling and reading as Gertlex suggests. Then you can learn the answers for yourself.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: quick question
« Reply #4 on: December 13, 2011, 07:58:38 PM »
Hi,

i mean pic 12f629(microcontroller) has serial communication or not
and how we use this pic what are the terminals that they have
can also we use mikrobasic to program it

I'd think the PIC12F-series would be supported by MikroBasic, but take a look at: http://www.mikroe.com/ to find out for sure.
If it is, it'll surely have serial commands like PicBasicPro, so all the bit-banging is taken care of and when initialized correctly, you just issue a command like: SEROUT ("some-data") (or whatever they may have chosen to call it).
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline aruna1

  • Supreme Robot
  • *****
  • Posts: 381
  • Helpful? 4
  • I'm an Ordinary guy
Re: quick question
« Reply #5 on: December 13, 2011, 08:46:27 PM »
hi
12F629 and 12F675 do not have hardware USART modules. but however you can always use software usart to communicate in serial.
I use PIC C compiler which allows me to add USART to 12F629 and 12F675 through software
I'm Me

Offline MahmoudTopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Helpful? 0
Re: quick question
« Reply #6 on: December 14, 2011, 05:36:32 PM »
thank u every one ur information is very helpful
i have another question please i want to know when i use a crystal oscillator with micro controller

Offline aruna1

  • Supreme Robot
  • *****
  • Posts: 381
  • Helpful? 4
  • I'm an Ordinary guy
Re: quick question
« Reply #7 on: December 14, 2011, 07:25:48 PM »
hi
12F629 and 12F675 have internal 4MHz oscillator with 1% precision (12F683 has maximum 8MHz internal oscillator). this means you can use oscillator pins of microcontroller as input/output pins if you are using internal oscillator.
4MHz internal oscillator is more than enough for our simple tasks. I have made a simple robot using 12F675 which uses internal oscillator in the past.

www.youtube.com/watch?v=PXp85c4nSJY


but if you need super fast operation with much more precision you will have to use a crystal oscillator. 12F629 and 12F675 support up to 20MHz speed. for example if you are using 12F675 to make a ultrasonic distance measuring system, it is a good idea to use a crystal oscillator because it provide accurate time measurement and higher resolution which is very important.
I'm Me

Offline MahmoudTopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Helpful? 0
Re: quick question
« Reply #8 on: December 15, 2011, 06:06:19 AM »
but what about 16f627 or 16f628 i found that internal oscillator 4 mhz or 37 khz
what this mean
should i use esternal oscillator for uart (serial communication) application
and generally what is the suitable oscillation for serial communication application

Offline aruna1

  • Supreme Robot
  • *****
  • Posts: 381
  • Helpful? 4
  • I'm an Ordinary guy
Re: quick question
« Reply #9 on: December 15, 2011, 08:19:58 AM »
hi

Quote
but what about 16f627 or 16f628 i found that internal oscillator 4 MHz or 37 kHz
what this mean

it means that PIC has two internal oscillator speeds. When using higher speed oscillator, power consumption is higher when comparing to lower speed. Therefore low power applications normally use lower speeds. in above PIC speed can be set dynamically that is it can change speeds on the go. for an example lets say you are reading a sensor values in time intervals and once values are read you have to do some calculations and a work depending on the sensor readings. then you can change speed to 4MHz while reading and doing calculation and work, and then go to lower speed while in idle time.


Quote
should i use esternal oscillator for uart (serial communication) application

you can use either internal or external oscillator for this.

Quote
and generally what is the suitable oscillation for serial communication application
4MHz or higher speed is suitable. but it can work at lower speeds but if you have to do other works also it is a good idea to use a higher speed so no lagging will occur.




I'm Me

Offline MahmoudTopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Helpful? 0
Re: quick question
« Reply #10 on: December 15, 2011, 10:25:01 AM »
thank u very  much

 


Get Your Ad Here

data_list