Woops, made a little error in my code .
The "prevswitchA0 = switchA0" should not be in a branch of the if-statement, but right after the if-statement.
Programs simulates perfectly when setting the switch to A1 and LED to A0, so it should work on hardware now .
Nicolas
Search found 527 matches
- Wed Aug 01, 2012 12:47 am
- Forum: Flowcode V5 Free Edition
- Topic: Problem with TRIS?
- Replies: 12
- Views: 7741
- Wed Aug 01, 2012 12:35 am
- Forum: Flowcode V5
- Topic: Programming failed: <6>
- Replies: 12
- Views: 7595
Re: Programming failed: <6>
There should be a log file with all the info written in that compile window. The warning you get is not an issue. To save some memory space, the compiler will only compile those functions you have used in your main program. Have you tried programming the 18F1230 with PPPv3 ? You can find that progra...
- Tue Jul 31, 2012 10:29 pm
- Forum: Programming Tips & Tricks
- Topic: MPASM decompiler
- Replies: 2
- Views: 7029
MPASM decompiler
Hey guys, not the usual flowcode program today ! I have been searching for quite some time for a MPASM decompiler, because I had a project in mind where I needed to decompile hex files, but I couldn't find any, so I decided to make my own :D. For the past couple of days I've been working on a decomp...
- Tue Jul 31, 2012 4:08 pm
- Forum: Forums d'aide en français
- Topic: Programme de détection infra-rouge (Résolu)
- Replies: 9
- Views: 7517
Re: Programme de détection infra-rouge
En effet, une fois que tu renommes ton programmes sans l'accent ça compile sans problème.
Bien vu Daniel !
Je ne savais pas que les accents auraient pu causer un problème, bon a savoir .
Nicolas
Bien vu Daniel !
Je ne savais pas que les accents auraient pu causer un problème, bon a savoir .
Nicolas
- Mon Jul 30, 2012 5:24 pm
- Forum: Flowcode V5 Free Edition
- Topic: Problem with TRIS?
- Replies: 12
- Views: 7741
Re: Problem with TRIS?
Doing my version of your program I saw that too. Don't really know why the LED turns off even thought it's set to be on.
Anyways, it should work on hardware.
Nicolas
Anyways, it should work on hardware.
Nicolas
- Sun Jul 29, 2012 11:51 pm
- Forum: Forums d'aide en français
- Topic: Programme de détection infra-rouge (Résolu)
- Replies: 9
- Views: 7517
Re: Programme de détection infra-rouge
Tu as ton transmetteur et ton récepteur dans le même programme. ça marchera pas comme ça. Je vois rien d'anormale dans ton code pour que ça te donne cette erreur, malheureusement :/. Tu dis que tu as deux PIC mais visiblement tu essayes de détecter le signal IR après avoir transmit ton signal... Je ...
- Sun Jul 29, 2012 11:07 pm
- Forum: Flowcode V5
- Topic: EEPROM Problem & Switch problem (Solved)
- Replies: 4
- Views: 3689
Re: EEPROM Problem & Switch problem
Hi, 296 is a 9 bit value. EEPROM can save 8 bit values. That's why when you read the value back, it's different. What you need to do is split the value in 2 bytes and save those bytes to the EEPROM. You can then read those 2 bytes back and put them together to make your 2 bytes value. byte = (value ...
- Sun Jul 29, 2012 5:52 pm
- Forum: Flowcode V5 Free Edition
- Topic: Problem with TRIS?
- Replies: 12
- Views: 7741
Re: Problem with TRIS?
Here's my version .
Don't know what that countdown is there for. I didn't use that.
Haven't tested it on breadboard but I'm fairly confident it will work.
Cheers,
Nicolas
Don't know what that countdown is there for. I didn't use that.
Haven't tested it on breadboard but I'm fairly confident it will work.
Cheers,
Nicolas
- Sun Jul 29, 2012 4:49 pm
- Forum: Forums d'aide en français
- Topic: Programme de détection infra-rouge (Résolu)
- Replies: 9
- Views: 7517
Re: Programme de détection infra-rouge
- Un transmetteur IR à 38kHz grace à un PIC - Deux récepteur IR 38kHz sur un (autre) PIC C'est bien ça ? Un bon site qui explique l'IR (en anglais) : http://www.sbprojects.com/knowledge/ir/index.php Tout se que tu dois faire c'est envoyé un certain 'code' via ton transmetteur. Ton récepteur lui déco...
- Sat Jul 28, 2012 10:38 pm
- Forum: Flowcode V5
- Topic: Flowcode 5 AVR, bug with macro
- Replies: 3
- Views: 2833
Re: Flowcode 5 AVR, bug with macro
No need to make another topic for this as it's being discussed here : http://www.matrixmultimedia.com/mmforums/viewtopic.php?f=46&t=11022 No need to be mad too, nothing is perfect and if there's a bug in Flowcode I'm sure Matrix will take care of it as soon as they can. You posted this topic 5 minut...
- Sat Jul 28, 2012 10:19 pm
- Forum: Programming Tips & Tricks
- Topic: LED as a light detector
- Replies: 10
- Views: 10634
Re: LED as a light detector
Just tried this today with my scope and a bright green LED and I'm getting negative voltage (From 0V to -1V approx). Kathode to + of probe and anode to - of the probe. Not sure if you guys had the same thing. Anyways I don't think I can use neg voltage with the PIC's ADC. Maybe I'm just doing it wro...
- Fri Jul 27, 2012 8:02 pm
- Forum: Programming Tips & Tricks
- Topic: LED as a light detector
- Replies: 10
- Views: 10634
Re: LED as a light detector
(Didn't see this before) The next thing to work on with this is to get it to talk to another one and send basic data, so feel free to chip in with ideas how i can do this as i aint got a clue :oops: You could probably try a software I²C with a clock frequency adapted to the sample rate of the ADC so...
- Fri Jul 27, 2012 7:26 pm
- Forum: Programming Tips & Tricks
- Topic: LED as a light detector
- Replies: 10
- Views: 10634
- Fri Jul 27, 2012 1:46 pm
- Forum: Forums d'aide en français
- Topic: EPPROM par Bus I2C?
- Replies: 12
- Views: 8054
Re: EPPROM par Bus I2C?
D'après le datasheet du PCF85102C, fig 6 p8 et fig 7 p9, c'est se qu'il faut faire .
Nicolas
Nicolas
- Thu Jul 26, 2012 8:54 pm
- Forum: Forums d'aide en français
- Topic: EPPROM par Bus I2C?
- Replies: 12
- Views: 8054
Re: EPPROM par Bus I2C?
Salut,
J'ai fait il y a quelques années un code (en C) qui écrit et lit d'un 24FC1025 avec mikroC.
Et une petite vidéo pour le fun : http://www.youtube.com/watch?v=U3EnYy5h8mk&feature=plcp (juste pour dire que ça marche )
Nicolas
J'ai fait il y a quelques années un code (en C) qui écrit et lit d'un 24FC1025 avec mikroC.
Et une petite vidéo pour le fun : http://www.youtube.com/watch?v=U3EnYy5h8mk&feature=plcp (juste pour dire que ça marche )
Nicolas
- Thu Jul 26, 2012 8:20 pm
- Forum: Flowcode V4
- Topic: No heading information in GPS Component
- Replies: 6
- Views: 5536
Re: No heading information in GPS Component
Hi,
Take a look a this article I made a while back (v3) : http://www.matrixmultimedia.com/mmforum ... =26&t=7879
GPS_ReturnData function should be able to retrieve that track angle.
Cheers,
Nicolas
Take a look a this article I made a while back (v3) : http://www.matrixmultimedia.com/mmforum ... =26&t=7879
GPS_ReturnData function should be able to retrieve that track angle.
Cheers,
Nicolas
- Tue Jul 24, 2012 11:01 pm
- Forum: Forums d'aide en français
- Topic: EPPROM par Bus I2C?
- Replies: 12
- Views: 8054
Re: EPPROM par Bus I2C?
Ton device I²C a une adresse physique (2). Et vu que c'est un EEPROM, c'est a dire une mémoire externe de X bytes/kbytes/..., il faut lui dire où écrire le/les bytes envoyé. Donc faut lui envoyer l'adresse physique puis l'adresse d'où tu veux écrire ton byte et puis le/les bytes a sauvegarder. Pour ...
- Mon Jul 23, 2012 10:12 pm
- Forum: Flowcode V5
- Topic: FC Compile Error
- Replies: 4
- Views: 4054
Re: FC Compile Error
Seems like you weren't running Flowcode as host.
Flowcode is trying to access the compiler at C:/program files/... probably and those folder are protected. Only host can request/open stuff from there like asking the compiler to compile your code.
That's my guess.
Nicolas
Flowcode is trying to access the compiler at C:/program files/... probably and those folder are protected. Only host can request/open stuff from there like asking the compiler to compile your code.
That's my guess.
Nicolas
- Mon Jul 23, 2012 2:02 pm
- Forum: Forums d'aide en français
- Topic: MACRO sans fin [Transféré ds Forum FLC v5]
- Replies: 16
- Views: 8953
Re: MACRO sans fin
Voilà c'est fait .
EDIT:
J'ai vu que t'avais fait un autre topic et un admin a répondu.
Dis moi si t'es d'accord pour effacer le topic précédent et je l'efface.
ça évite les doublons.
EDIT:
J'ai vu que t'avais fait un autre topic et un admin a répondu.
Dis moi si t'es d'accord pour effacer le topic précédent et je l'efface.
ça évite les doublons.
- Mon Jul 23, 2012 6:30 am
- Forum: Flowcode V5
- Topic: File corrupted?
- Replies: 4
- Views: 3033
Re: File corrupted?
Flowcode automatically makes a backup of your file and names it 'something.fcf.001'.
Never had any problems with Flowcode so far.
Nicolas
Never had any problems with Flowcode so far.
Nicolas
- Mon Jul 23, 2012 4:53 am
- Forum: General Programming
- Topic: LED blinking/chaser program in C code Only?
- Replies: 1
- Views: 2929
Re: LED blinking/chaser program in C code Only?
Probably something like this in a C block should work : // set internal oscillator, see datasheet trisb = 0; // set IO to input or output, 0 for all output while (1) { portb = 0; // clear output delay_s(1); // 1s delay portb = 0xFF; // set output delay_s(1); // 1s delay } Not sure if the delay funct...
- Sun Jul 22, 2012 11:03 pm
- Forum: Forums d'aide en français
- Topic: MACRO sans fin [Transféré ds Forum FLC v5]
- Replies: 16
- Views: 8953
Re: MACRO sans fin
J'ai plus trop d'idée pour t'aider. Peut-être que quelqu'un pourra t'aider dans la section v5 du forum. Faut d'abord s'inscrire par contre. Une fois que c'est fait, prévient moi et je vais changer se topic http://www.matrixmultimedia.com/mmforums/viewtopic.php?f=6&t=10996 de place. Si je réponds pas...
- Sun Jul 22, 2012 10:54 pm
- Forum: General Programming
- Topic: Swapping pins to suit PCB layout
- Replies: 4
- Views: 2855
Re: Swapping pins to suit PCB layout
Flowcode has a lot of advantages. It generates the correct register settings for the microcontroller so you don't have to do it (I hate to do this in C :P ). It comes with a ton of awesome components/functions with which you can simulate your program on the PC before trying it on hardware. You can s...
- Sun Jul 22, 2012 10:10 pm
- Forum: Flowcode V5
- Topic: Macro with an array type parameter
- Replies: 3
- Views: 2786
Re: Macro with an array type parameter
You don't really need to add arguments to flowcode macros as each defined variable is a global variable and can be used anywhere in the code (except for local variables in macros).
Nicolas
Nicolas
- Sun Jul 22, 2012 10:04 pm
- Forum: Flowcode V5
- Topic: PIC18F4520 and RC5
- Replies: 9
- Views: 6438
Re: PIC18F4520 and RC5
I think you should be able to receive data on a 38kHz receiver even thought it's 36kHz modulated.
I might have done this in one of my previous IR test, worked fine.
Nicolas
PS: Just to be sure, try with a scope or something with which you could see the output at the receiver.
I might have done this in one of my previous IR test, worked fine.
Nicolas
PS: Just to be sure, try with a scope or something with which you could see the output at the receiver.