Very Noob Questions In PIC

Status
Not open for further replies.

newbieqq

New Member
Hi everyone , i m kindda new in using PIC and not familier with it
so i would need everyone helps~

For example, i got a pic with pin RB0/PWM0

RB0/PWM0 => RB0 = Digital I/O ; PWM0 = PWM output 0.
my question is, is this pin serve for either the purpose of Digital I/O or PWM output 0?


As for my 2nd question,
as the 4 x 7 segment led display as show on below,
**broken link removed**
do i have to fix my connection on portC and portD as shown on the diagram? or i can connect it to any port as i like (such as portA or portB)

Basically how to you guys justify which connection is to fix into which pin?
 
1. Many PIC pins have multiple functions, you can use them anyway you choose.

2. Yep any I/O pin(s) will work.

The datasheets tell all.

Try something simple, pick a pin and try to flash an LED with it. An LED display is popular but experience will help.
**broken link removed**
 

Yes. Its use is selected in code.


You can connect to any port you want, but the code has to take account of it.

For the 7 segments, it makes the code simpler if all the segments are on one port so that all 7 bits can be handled with one instuction.

For individual bits, such as Segment_1 and Segment_2 in your example, it doesn't much matter where they are.

The subject of pin assignment is quite involved, getting more so as the PICs get bigger. Things to consider are:-

What peripherals (e.g. PWM, AD converter etc) that are to be used so will need their pins for those purposes only.

What input levels (TTL / Shmitt trigger) is required

What output load is needed.

What pins are associated, as in the example.

Circuit layout

Whether the peripheral pins can be selected.

Whether code has to be compatible with other layouts.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…