Connect PR1-A to a computer

LED Blinking, Walking with Cytron Servo, Displaying RFID, Multi-function Mobile Robot......

Connect PR1-A to a computer

Postby harry » Wed Jul 07, 2010 11:22 am

Hello
What hardware do I need to connect the PR1-A to a computer to create a log,such as which LED was light up, time ?
Thanks
harry
Freshie
 
Posts: 6
Joined: Tue Jul 06, 2010 5:45 pm

Re: Connect PR1-A to a computer

Postby sich » Wed Jul 07, 2010 3:23 pm

Usually we connect microcontroller to PC using serial-uart connection. You can use rs232 circuit or get a UC00A usb to uart converter from cytron. However, since you're using PR1, the chip is PIC16F84A which doesn't have uart interface unless you bit-bang it using software approach. Easiest way is to change to other PICs which have uart.

A convenient product from cytron that allows u to connect to PC is SK40C PIC start-up kit. You can choose to use uart from PIC and connect it to PC throught UC00A OR use the USB port provided (for use with PICs which USB function). Example programs are given.

http://www.cytron.com.my/viewProduct.php?pid=EQYVPSEiEBYtERAGAj0IL9StqibHgM8d5ywoc0qEhgk=
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 603
Joined: Tue Apr 21, 2009 2:15 pm

Re: Connect PR1-A to a computer

Postby harry » Thu Jul 08, 2010 8:53 am

Thanks Sich,
The reason I want to use PR1 is because I want to control LCD. And the PR 1 is really convenience for it.
In fact, I want to use 2 PR1 boards connected wirelessly.( using RF)

The first PR1 one will be connected to a transmitter.
The second PR1 will be connected to a receiver.
The second PR 1 will respond and light up the same LED as the first PR1, it also has another duty is to connect no a pc to create a log.
Please suggest a PIC that I can fix to SK40C, so I can control LED and at the same time connect to PC
Thanks
harry
Freshie
 
Posts: 6
Joined: Tue Jul 06, 2010 5:45 pm

Re: Connect PR1-A to a computer

Postby hyng » Thu Jul 08, 2010 9:48 am

SK40C is cater for 40 pins of 16F or 18F PIC. Among these PIC, 16F877A is the most common type. Many of cytron's sample source codes are base on this PIC. You may use that PIC. SK40C also provide sample code on serial communication.
User avatar
hyng
Moderator
 
Posts: 292
Joined: Thu Apr 16, 2009 11:35 am

Re: Connect PR1-A to a computer

Postby harry » Fri Jul 09, 2010 4:39 pm

Can I use, 16F8876A instead of 16F877A?

Because I want to modify the PR 16 , to control LED as well as feed info to my pc to create a log.
THanks
harry
Freshie
 
Posts: 6
Joined: Tue Jul 06, 2010 5:45 pm

Re: Connect PR1-A to a computer

Postby sich » Sat Jul 10, 2010 2:30 am

16F876A is 28-pin microcontroller while SK40C only has 40-pin IC socket on the board. That means you can't insert a 16F876A to SK40C. The good news is 16F876A and 16F877A are actually identical except for the pin assignment. 877A has more pins than 876A. So if you're using 877A, you still can take the sample code of PR16 (which is using 876A) and perhaps you don't need to change any thing in the code. However, i'm not sure about it because i never went through the code. Anyhow, it's ok to use 877A in this case.
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 603
Joined: Tue Apr 21, 2009 2:15 pm


Return to DIY Project Set

Who is online

Users browsing this forum: No registered users and 15 guests