Search found 18 matches
- 28 Sep 2010 12:32
- Forum: mikroC PRO for PIC General
- Topic: Can i have a Pic to switch from HID Keyboard / Mass Storage?
- Replies: 0
- Views: 800
Can i have a Pic to switch from HID Keyboard / Mass Storage?
Hi all i have a project in mind but have some questions. Im going to make a board as small as possible (as a pendrive) whit a switch that if ON boots the pic as a Mass Storage and let be access a microSD card on the board, just like a regular pendrive.(i dont know if this is even possible) If Off th...
- 21 Jan 2010 19:11
- Forum: mikroC General
- Topic: PIC 2 PIC Master/Slave Communication using I2C... Enjoy
- Replies: 41
- Views: 109421
Dozenth this code only let you pass one variable? So you can only read / write one fix variable. and Short only. I have a very similar code but allows 255 different variables to be read and a another 255 to write. You can also pass integers or Long variables. If any one interested i can post here or...
- 08 Jan 2010 12:14
- Forum: mikroC PRO for PIC General
- Topic: How to Telnet Or Simple Web Interface ?
- Replies: 0
- Views: 1126
How to Telnet Or Simple Web Interface ?
Hi there im familiar with assembly and mikroC and normaly use 18F8722 SMD and do a lot of boards myself. I want to make a board whit a Ethernet interface so i can remotly switch a some output port. What pic you guys recommend and is there any sorce code for it? I want to switch the Outputs whit teln...
- 06 Feb 2009 02:32
- Forum: mikroC General
- Topic: how can i check if i2c devise is pressent ?
- Replies: 3
- Views: 1864
Thx all for the help i finish up making this as a status system to all my devices. I2C_Start(); I2C_Wr(0xC0); if (SSPCON2.ACKSTAT) Lcd8_Out(2, 8, "S");//missing or error else Lcd8_Out(2, 8, "s");// ok I2C_Stop(); but i have to change all my read's to avoid error's and hangs. exemple.: this skips the...
- 03 Feb 2009 16:20
- Forum: mikroC General
- Topic: how can i check if i2c devise is pressent ?
- Replies: 3
- Views: 1864
how can i check if i2c devise is pressent ?
Hi all, i have a robot whit several i2c devises and i would like to know if there is a way to check if one is present, i know that i can just read something, but if the devise is unplugged the program will crash (but the timer1 is still working). In the help there is: "I2C_Rd -> Reads one byte from ...
- 19 Jan 2009 20:22
- Forum: mikroC General
- Topic: MikroC 8.2 menus
- Replies: 19
- Views: 7048
Re: MikroC 8.2 menus
Why MikroC 8.2 menus are not working correctly. If I click one menu open and then move the mouse pointer on another menu the menu doesn't open whole but only the last menu item. Very annonying bug. Is there patch for that? OS is Windows XP Pro FI + SP3. The MikroC version 8.1 did work correctly, th...
- 09 Jan 2009 18:11
- Forum: mikroC General
- Topic: Noob to USB HID needs help
- Replies: 18
- Views: 5952
thx fot the help dany but something is missing or im doing it wrong. i have put the setting OSCCON<1:0> to "00". i have put it in the main code OSCCON = 0 is this ok? for "Osc type setting" _i chose FOSC_XT_XT_1H in the edit project is this ok? for "CPUDIV" _i chose_CPUDIV_OSC1_PLL2_1L in the edit p...
- 18 Dec 2008 14:25
- Forum: mikroC General
- Topic: Noob to USB HID needs help
- Replies: 18
- Views: 5952
I don't have any USB experience yet but I seem to remember someone saying the grounds need to be connected even though it is powered separately. The USB GND and POWER GND are connected i dint connect the vUSB on the pic to anything, should it be connected? Only a capacitor of about 200 nF (or 2 tim...
- 18 Dec 2008 01:42
- Forum: mikroC General
- Topic: Noob to USB HID needs help
- Replies: 18
- Views: 5952
Sorry if i wasn't clear (English is not my first language) I made a board myself whit a 18F2458 and a 40Mhz oscillator, i dint connect the vUSB on the pic to anything, should it be connected? im using external power. Thats my fuses and my code is based on the USB HID help file. Just need to know why...
- 17 Dec 2008 21:21
- Forum: mikroC General
- Topic: Noob to USB HID needs help
- Replies: 18
- Views: 5952
Noob to USB HID needs help
Hi im going nuts tring to put my first USB prodject to work and i always get the pc (vista or XP) saing that there is a usb problem. so I made a borad whit a pic 18f2458 and a 40mhz osc using mikroc 8.2 I don't have anything connected to the vUSB cuz i power the pic externally (should i connect to s...
- 24 Oct 2008 15:37
- Forum: mikroC General
- Topic: .h files and Build Problem
- Replies: 2
- Views: 1508
Hi, In order to save your .h or some other file, you need to add them in Project Files. Please read carefully File Inclusion and Add/Remove Files from Project topics in Help section of your compiler. Regards my .h files are in the prodject (at least i think so cuz they apear in the prodjact files -...
- 24 Oct 2008 12:20
- Forum: mikroC General
- Topic: TestBit() Equivalent?
- Replies: 7
- Views: 3511
Aaah. Good idea. I didn't think of using the bit-shift feature with a variable. By extension of your idea, you can inline the code to reduce the extra assembler relating to the nested function: #define TestBit(A,B) ( A & (1<<B) ) ? 1 : 0 The above will work up to B < 16, so it is therefore good for...
- 23 Oct 2008 22:36
- Forum: mikroC General
- Topic: .h files and Build Problem
- Replies: 2
- Views: 1508
.h files and Build Problem
Hi there i don't know if its a feature or bug.
Im using 8.2 and every time a change a .h i must save it before compiling. and its very annoying.
other thing can i change the build (crtl + F9) to other key?
i always try the F10 First :P old habit
Im using 8.2 and every time a change a .h i must save it before compiling. and its very annoying.
other thing can i change the build (crtl + F9) to other key?
i always try the F10 First :P old habit
- 23 Oct 2008 22:27
- Forum: mikroC General
- Topic: How to btfsc in C or its beter to use asm? SOLVED
- Replies: 2
- Views: 2501
- 22 Oct 2008 18:49
- Forum: mikroC General
- Topic: How to btfsc in C or its beter to use asm? SOLVED
- Replies: 2
- Views: 2501
How to btfsc in C or its beter to use asm? SOLVED
Hi all i have a quick question.
I need to check if a bit in a variable is 0 or 1.
In assembly i woulld use
how can i do that in c? if i whant a port is
but using in a variable i got error.
or is it better to use asm? and how would i do that.
thx in advance.
I need to check if a bit in a variable is 0 or 1.
In assembly i woulld use
Code: Select all
btfsc variable.2
Code: Select all
if PORTB.F2
or is it better to use asm? and how would i do that.
thx in advance.