Search found 548 matches
- Wed Jan 16, 2008 5:49 pm
- Forum: Electronics products
- Topic: calculating series and pullup resistance needed
- Replies: 2
- Views: 5302
Re: calculating series and pullup resistance needed
Hello Ondra The simple calculation for the base current of the transistor is collector current/hfe. hfe for the 2N3906 is anywhere between 30 and 300. For your applications the transistors are being used as switches so they can be driven into saturation. Using the hfe figure of 30, the base current ...
- Tue Jan 15, 2008 5:17 pm
- Forum: E-blocks
- Topic: Power Supply to Multiprogrammer
- Replies: 3
- Views: 4231
Re: Power Supply to Multiprogrammer
Note: A supply voltage below 12v might affect the reliability of the normal high voltage programming operation, and would only be suitable when the LVP (Low Voltage Programming) option was being used.
Sean
Sean
- Tue Jan 15, 2008 5:00 pm
- Forum: E-blocks
- Topic: Power Supply to Multiprogrammer
- Replies: 3
- Views: 4231
Re: Power Supply to Multiprogrammer
Hello, The main input capacitor on the EB006 board is rated at 16v. This is connected across the input voltage after it has passed through a bridge rectifier so an 18v input supply will probably cause it to operate too close to its operating limit (or possibly above). I would recommend some form of ...
- Thu Jan 10, 2008 10:42 am
- Forum: Flowcode V2 & V3
- Topic: timer0 and PWM
- Replies: 2
- Views: 2934
Hello Ron, The use of the timer 0 interrupt should not significantly affect any of the other functions if the standard interrupt service rules are observed: Keep the service routines short. Take care when modifying registers and global variables that may be being used in the main program. The macro ...
- Wed Jan 09, 2008 2:44 pm
- Forum: Flowcode V2 & V3
- Topic: 16F877a Pull Up
- Replies: 4
- Views: 4582
Hello Joe The C compiler ignores everything between /* and */ characters (they are included in the C-code box to prevent the example text from being compiled). The option_reg assignment is not being compiled or executed in this case. All the sample text should be deleted from a C-code block and the ...
- Fri Dec 21, 2007 1:21 am
- Forum: Flowcode V2 & V3
- Topic: Need more than 2 pwm
- Replies: 1
- Views: 2195
The technique used to create extra PWM channels depends on the frequency and accuracy required. One of the best ways to generate accurate timing intervals is the Timer 0 interrupt. Timer 0 continuously counts from 0 to 255 and can generate an interrupt when it overflows back from 255 to 0. The clock...
- Mon Dec 17, 2007 10:53 am
- Forum: Flowcode V2 & V3
- Topic: Defining a variable that is only 1 bit in size
- Replies: 1
- Views: 2587
Hi Ron, The best way to store single bits of data (or small combinations of bits) is to use the AND, OR and XOR functions in a calculation block. These commands can be used to manipulate individual bits within a byte or integer variable. If you create a variable called Flags: A bit can be set by ORi...
- Mon Dec 17, 2007 12:43 am
- Forum: Flowcode V2 & V3
- Topic: Tri-State mode
- Replies: 1
- Views: 2151
Hello Ron, I/O pins generally remain in the last state they were set. On power-up all I/O pins are configured as inputs (the output buffers are tri-state - both the high and low output drivers are off). In Flowcode they will remain as inputs unless they are accessed by an output command, or an assoc...
- Sun Dec 16, 2007 11:48 pm
- Forum: Flowcode V2 & V3
- Topic: Interrupts!
- Replies: 1
- Views: 2183
Hello Legoman, The ADC component functions: SampleADC, ReadAsInt and ReadAsByte can be included in the macro called by the timer interrupt. The returned value and any control flags can then be saved to global variables. It is advisable not to do too much more from within the interrupt service routin...
- Sun Dec 16, 2007 6:00 pm
- Forum: Flowcode V2 & V3
- Topic: ADC Component & Simulation
- Replies: 2
- Views: 2593
Hello Ron, The SampleADC function from the ADC component must be executed before each attempt to read a result. The chip has a single ADC and an analogue multiplexer to connect the selected ANx input to it. Multiple ADC components can be loaded into a flowchart. Each one can be connected to a select...
- Fri Dec 07, 2007 10:23 am
- Forum: Flowcode V2 & V3
- Topic: Interrupts?
- Replies: 1
- Views: 2236
Hello Ondra The external interrupt pins (INTx) are edge triggered - they react when the signal level changes in the selected direction. The active edge (positive going or negative going) can be selected in the Flowcode interrupt configuration screen. The fast reaction time of interrupts can sometime...
- Thu Dec 06, 2007 6:49 pm
- Forum: Flowcode V2 & V3
- Topic: Using PICkit2 with Flowcode
- Replies: 50
- Views: 113465
I have been testing the Piklab programmer application (piklab-prog win32 static version) from sourceforge.net. It is currently in beta testing (v0.15.1), has a command line interface that could be made to work with Flowcode, and supports several programmers. Devices were successfully programmed usin...
- Thu Dec 06, 2007 6:17 pm
- Forum: Flowcode V2 & V3
- Topic: using float variable in an interrupt
- Replies: 3
- Views: 2794
- Thu Nov 15, 2007 6:17 pm
- Forum: Flowcode V2 & V3
- Topic: Interrupt Handling ?!
- Replies: 11
- Views: 9325
Hello Alan The code you are using should be copied to a custom interrupt component. If you copy an interrupt component into your program, and double-click on it to open the configuration window, you can select 'Custom' in the 'Interrupt on' box. Put a meaningful name in the 'Display name' box, and m...
- Mon Nov 12, 2007 2:09 pm
- Forum: Flowcode V2 & V3
- Topic: Interrupt Handling ?!
- Replies: 11
- Views: 9325
Here are some examples of the code required for custom interrupts. These simple examples are written for the ATMEGA8, as illustrations of the type of information required for each section of the custom interrupt component. When using alternative devices please refer to the individual device data she...
- Fri Nov 09, 2007 12:14 pm
- Forum: Flowcode V2 & V3
- Topic: ADC ?
- Replies: 5
- Views: 4943
Hello, Reading a 10-bit A/D conversion is as easy as reading an 8-bit conversion. The double register read, bit shifting and integer assembly is all handled by Flowcode. The variable receiving the conversion value must be declared as an integer and will be set to a value between 0 and 1023. There is...
- Mon Oct 22, 2007 2:17 pm
- Forum: Flowcode V2 & V3
- Topic: importing project to new pic.
- Replies: 1
- Views: 2308
Hello Wayne, The 16k bytes of Flash memory in the 18F4420 are used 2 bytes at a time due to the 16-bit program word format, resulting in 8k words The 16F877 has 14k bytes of flash that are used 14-bits at a time, giving it the same 8k of program words. Devices with more program memory include the 18...
- Mon Oct 22, 2007 1:31 pm
- Forum: Flowcode V2 & V3
- Topic: ADC ?
- Replies: 5
- Views: 4943
Hello Ondra, When you read the ADC value as a byte (8-bit conversion), the converter divides the reference voltage (5v) by 256, giving a resolution of approximately 20mV (19.53mV). The value returned by the component is the input voltage divided by the resolution (460mV / 20mV = 23). If you read the...
- Fri Oct 19, 2007 5:02 pm
- Forum: Flowcode V2 & V3
- Topic: Programmer settings
- Replies: 10
- Views: 10461
Hi Koen, The solution to this problem is to modify the flash programming command line in 'tools\MX_bats\avrc.bat'. Adding the -u switch prevents the fuses from being read. Example: :ProgFlash @SET AVRDUDEcmd="%~dp0..\AVRDUDEusb\avrdude.exe" -p %1 -P %3 -c %2 -u -U flash:w:%4 @GOTO Send The -u switch...
- Thu Oct 18, 2007 10:43 am
- Forum: Flowcode V2 & V3
- Topic: Fuse Programming
- Replies: 5
- Views: 5648
Fuse Programming
Flowcode for AVR now has the ability to program the device fuse settings from the Chip->Configure menu option. The following settings will be used as defaults for all devices: 0x0,0xdf 0x1,0xff 0x2,0xff The first value in each pair selects the fuse to be programmed: 0x0 = Fuse High Byte (hfuse) 0x1 ...
- Tue Oct 16, 2007 2:19 pm
- Forum: Flowcode V2 & V3
- Topic: Interrupt Handling ?!
- Replies: 11
- Views: 9325
I have carried out some interrupt timing tests using Flowcode and an ATMEGA168 running at 4MHz and 20MHz. Using a simple program to allow the value on PORT B to be incremented by an interrupt on INT0, the following response times were measured: 4MHz xtal - 12us 20MHz xtal - 2us The program continuou...
- Tue Jun 26, 2007 2:57 pm
- Forum: C and ASM Programming
- Topic: problems with c for AVR course
- Replies: 4
- Views: 6844
Support for char, int and other data types is the responsibility of the C compiler, not the target device. The example program (ex 2.4) compiles and runs on an ATMEGA32 with all the variables declared as unsigned char. Do you get compiler warnings/errors when you compile the original program code (u...
- Tue Jun 26, 2007 12:42 pm
- Forum: C and ASM Programming
- Topic: problems with c for AVR course
- Replies: 4
- Views: 6844
Hello First the compiler warning The warning is caused by the line: void main(void) The GCC compiler is capable of generating code that can return an integer value (to a calling function or operating system) on termination. The programs compile without warnings if the line is changed to: int main(vo...