Search found 106 matches
- 20 May 2022 02:03
- Forum: PIC PRO Compilers
- Topic: Accessing Multiple SFR Register Bits
- Replies: 3
- Views: 1346
Re: Accessing Multiple SFR Register Bits
I'm not sure how the union works. Can you give me an example? Thanks.
- 19 May 2022 05:12
- Forum: PIC PRO Compilers
- Topic: Accessing Multiple SFR Register Bits
- Replies: 3
- Views: 1346
Accessing Multiple SFR Register Bits
Is it possible to create a variable that has 8 bits (byte?) so that each bit accesses a different SFR register bit? For example, I want to access PORTA bits 0-3 and PORTB bits 0-3. So, if I set the variable to %00010001 RA0 and RB0 would set. I know I could do it with a subroutine by passing a byte ...
- 01 Dec 2017 07:11
- Forum: PIC PRO Compilers
- Topic: HELP!! rc1 & rc0 pin of P18F4520 question
- Replies: 3
- Views: 3732
Re: HELP!! rc1 & rc0 pin of P18F4520 question
Lorenzo,
In the PIC18F4520 pins RC1 and RC2 are also used for capture and compare. In order for these pins to function as I/O port pins the capture/compare module must be disabled by setting the CCPxCON register appropriately. I usually do this in the initialize portion of my program.
Roy
In the PIC18F4520 pins RC1 and RC2 are also used for capture and compare. In order for these pins to function as I/O port pins the capture/compare module must be disabled by setting the CCPxCON register appropriately. I usually do this in the initialize portion of my program.
Roy
- 02 Jul 2012 15:25
- Forum: mikroBasic PRO for PIC General
- Topic: 18F2550 Battery Powered USB Device
- Replies: 1
- Views: 1062
Re: 18F2550 Battery Powered USB Device
The USB port provides +5v from your PC. I think the easiest method would be to feed that +5v to an input pin connected to a 10K ohm resistor tied to ground. If the USB port is not connected that pin would be "0" so you could disable your USB port logic. If that pin was high (1) that would indicate t...
- 02 Jul 2012 15:20
- Forum: mikroBasic PRO for PIC General
- Topic: problem with USB connection PIC18F4550
- Replies: 6
- Views: 2322
Re: problem with USB connection PIC18F4550
My PIC and USB guide might help. You can download it from here:
http://www.ktgunsmith.com/other/PIC_and_USB_3-80.pdf
http://www.ktgunsmith.com/other/PIC_and_USB_3-80.pdf
- 02 Jul 2012 15:19
- Forum: mikroBasic PRO for PIC General
- Topic: 18f4550 USB problem.
- Replies: 4
- Views: 1849
Re: 18f4550 USB problem.
My PIC and USB guide might help. You can download it from here:
http://www.ktgunsmith.com/other/PIC_and_USB_3-80.pdf
http://www.ktgunsmith.com/other/PIC_and_USB_3-80.pdf
- 07 Dec 2011 01:57
- Forum: mikroBasic PRO for PIC General
- Topic: Help for a new user
- Replies: 2
- Views: 1169
Re: Help for a new user
Also, be sure the Button library is enabled or the "Button" command will not work.
- 25 Nov 2011 22:50
- Forum: mikroBasic PRO for PIC General
- Topic: Problema con interrupciones por periféricos RB4:RB7
- Replies: 3
- Views: 3790
Re: Problema con interrupciones por periféricos RB4:RB7
For most MCU's that use the change on PORTB interrupt you need to reset the interrupt flag and read PORTB within the interrupt routine. The change on PORTB interrupt is triggered by any change on PORTB, positive or negative. You cannot select rising or falling edge triggering for the change on PORTB...
- 18 Nov 2011 06:53
- Forum: mikroBasic PRO for PIC General
- Topic: Random numbers for 16F / 18F
- Replies: 7
- Views: 2989
Re: Random numbers for 16F / 18F
I posted a reply to random numbers here http://www.mikroe.com/forum/viewtopic.php?f=97&t=30624 . Basically I use the MikroProgram Suite to randomize the contents of EEPROM memory, then every time the PIC is powered up I rotate bytes within EEPROM addresses, and bits within EEPROM bytes. It works pre...
- 28 Sep 2011 17:02
- Forum: mikroBasic PRO for PIC General
- Topic: Beginner with registers and hexa (?)
- Replies: 7
- Views: 2426
Re: Beginner with registers and hexa (?)
I think Sasa72 is right with most of his points. However, Nemweb seems to be a motivated young man, and with enough motivation, anything can be learned. My recommendation is to get some introductory books on the topics; basic electronics, digital electronics, microcontroller basics (available from M...
- 27 Sep 2011 18:09
- Forum: mikroBasic PRO for PIC General
- Topic: Problem with USB 18F4550
- Replies: 4
- Views: 1697
Re: Problem with USB 18F4550
Claudio, You also need to enable the internal USB Voltage Regulator, this is about the 10th line down in the configuration. Are you using one of the Mikroelektronika development boards? If not, then you will also need a 0.22 uF capacitor connected from pin 18 to ground for the internal USB regulator...
- 27 Sep 2011 17:53
- Forum: mikroBasic PRO for PIC General
- Topic: Beginner with registers and hexa (?)
- Replies: 7
- Views: 2426
Re: Beginner with registers and hexa (?)
Hello Nemweb, I used to teach computer technology so let me try to help. We use the decimal number system (base 10) which means we have 10 digits, 0 - 9. This also means that each position in a multi-digit number represents a power of 10. For example, the number 2564 can be represented by: (4 x 10^0...
- 08 Sep 2011 19:23
- Forum: mikroBasic PRO for PIC General
- Topic: KeyPad
- Replies: 13
- Views: 3611
Re: KeyPad
Trevor, Actually, your keypad will also work if you just remove the 10K pull down resistors. This way your rows will be high (1) if a switch is open because of your 100K pull up resistors. Your program needs to make RA0, RA1, and RA2 inputs, RA3, RA4 and RA5 outputs which intially should be set all ...
- 04 Aug 2011 14:50
- Forum: mikroBasic PRO for PIC General
- Topic: USB and PIC18F2550
- Replies: 19
- Views: 7207
Re: USB and PIC18F2550
I too had many problems with getting USB to work. As others have stated here, the configuration must be exactly correct. Also, be sure you have a .22uF capacitor connected from pin 14 to ground to enable the internal USB regulator. Your configuration should look like this: [img] http://www.ktgunsmit...
- 04 Aug 2011 14:15
- Forum: mikroBasic PRO for PIC General
- Topic: Data entry from keypad
- Replies: 1
- Views: 1035
Re: Data entry from keypad
Here is an example from a project I'm building: '******************************************************************************* ' This procedure allows the user to enter load data into a file on the SD memory ' card. The user enters 3 lines, each line is 20 characters and ends with CR/LF ' characte...