Quantcast
Channel: MCS Electronics Forum
Viewing all 20717 articles
Browse latest View live

BASCOM-AVR : Bascom-AVR 2.0.7.8 IDE high processor load? : REPLY

$
0
0
if you do a test, please use Pauls project since i have that one too. I just had a look but my cpu load is just 1% Maybe you can post your settings xml file (help, about, xml data link) or send it to support. I can not imagine which setting it could be, but loading a setting file from a user helped me to reproduce problems. Maybe you have enable automatic pdf download on?. When there is no inet connection this could be a problem. I am curious what you find. The pdf download is the only other process that can be triggered by the editor.

BASCOM-AVR : Bascom-AVR 2.0.7.8 IDE high processor load? : REPLY

$
0
0
pdf downloads are not turned on. I get windows error window when closing Bascom IDE. bascavr.exe: MM Operation after uninstall. FastMM has detected GetMem call after FastMM was uninstalled. Not sure what that means but never seen it before. Thanks Jerry

BASCOM-AVR : Bascom-AVR 2.0.7.8 IDE high processor load? : REPLY

$
0
0
Hi, I've seen high CPU load in the Editor wen opening my current Project (260Kb source in 17 files). The IDE seems to use alot of CPU for maybe 20-30 seconds shortly after starting, the to CPU load Drops to almost 0%. On atleast 2 occasions the CPU load was stuck at 100% on one CPU. After shutting down the IDE, restarting the PC everything when back to normal. Regards Ian Dobson

BASCOM-AVR : Led matrix issues : NEWTOPIC

$
0
0
Hello everyone, I'm been busy experimenting with multiplexing on a 5x5 LED matrix, i've got it working but as expected there are some problems i don't really know how to fix. [b:961c662c29]Problem nr 1 :[/b:961c662c29] uneven LED brightness, when i turn on the columns one by one the brightness of the LEDS decreases. This doesn't happen on the rows. [b:961c662c29]Problem nr 2:[/b:961c662c29] ghosting, when i turn on the rows one by one, the row above is dimly lit aswell. This doesn't happen on the columns [img:961c662c29]http://i62.tinypic.com/wa2d1h.jpg[/img:961c662c29] I'm guessing that the ghosting problem is a hardware problem, maybe i need to configure the transistors another way? The uneven brightness might be a software problem, i have heard a short pause between each 'row refresh' should fix it. Unfortunatly it's quite difficult to add a pause due to the way my timer is setup. I would love to hear suggestions about these problems, feel free to tell me if there's something bad about my code or schematic. My schematic : [img:961c662c29]http://i57.tinypic.com/sngv44.png[/img:961c662c29] My code : [code:1:961c662c29] $regfile = "m88adef.dat" 'Specify the AVR being used $crystal = 18432000 'Define Clock as 8 MHz, using Internal RC Osc as source $hwstack = 48 'Default 32 for the hardware stack $swstack = 48 'Default 10 for the SW stack $framesize = 48 'Default 40 for the frame space ' ------------------ CONFIGURABLE VARIABLES ------------------ ' AMOUNT FRAMES USED Dim Amount_frames As Integer Amount_frames = 9 ' FRAMES PER SECOND Dim Frames_per_sec As Single Frames_per_sec = 2 Frames_per_sec = 1125 / Frames_per_sec ' ------------------ VARIABLES ------------------ ' FRAMES COUNTER Dim Frame_counter As Integer Frame_counter = 1 ' PORT USED TO DRIVE COLUMNS Config Portb = Output ' PORT USED TO DRIVE ROWS Config Portc = Output ' ROWS COUNTER Dim Row As Integer Row = 1 ' CLOCK COUNTER Dim Ttc As Single Ttc = 1 ' 2D ARRAY STUFF Const Nr_of_frames = 20 ' define here Size of dimension 1 Const Nr_of_rows = 5 ' define here Size of dimension 2 Const 2d_array_size = Nr_of_frames * Nr_of_rows ' sum of elements in 2d-Array Dim Barray2d(2d_array_size) As Byte ' hold the data of the 2d-array Declare Function Getarray2d(byval D1 As Integer , Byval D2 As Integer) As Integer Declare Sub Setarray2d(byval D1 As Byte , Byval D2 As Byte , Byval Pvalue As Byte) As Byte ' ------------------ FRAMES ------------------ ' FRAME 1 Call Setarray2d(1 , 1 , &B11111) Call Setarray2d(1 , 2 , &B00000) Call Setarray2d(1 , 3 , &B00000) Call Setarray2d(1 , 4 , &B00000) Call Setarray2d(1 , 5 , &B00000) ' FRAME 2 Call Setarray2d(2 , 1 , &B11111) Call Setarray2d(2 , 2 , &B11111) Call Setarray2d(2 , 3 , &B00000) Call Setarray2d(2 , 4 , &B00000) Call Setarray2d(2 , 5 , &B00000) ' FRAME 3 Call Setarray2d(3 , 1 , &B11111) Call Setarray2d(3 , 2 , &B11111) Call Setarray2d(3 , 3 , &B11111) Call Setarray2d(3 , 4 , &B00000) Call Setarray2d(3 , 5 , &B00000) ' FRAME 4 Call Setarray2d(4 , 1 , &B11111) Call Setarray2d(4 , 2 , &B11111) Call Setarray2d(4 , 3 , &B11111) Call Setarray2d(4 , 4 , &B11111) Call Setarray2d(4 , 5 , &B00000) ' FRAME 5 Call Setarray2d(5 , 1 , &B11111) Call Setarray2d(5 , 2 , &B11111) Call Setarray2d(5 , 3 , &B11111) Call Setarray2d(5 , 4 , &B11111) Call Setarray2d(5 , 5 , &B11111) ' FRAME 6 Call Setarray2d(6 , 1 , &B00000) Call Setarray2d(6 , 2 , &B11111) Call Setarray2d(6 , 3 , &B11111) Call Setarray2d(6 , 4 , &B11111) Call Setarray2d(6 , 5 , &B11111) ' FRAME 7 Call Setarray2d(7 , 1 , &B00000) Call Setarray2d(7 , 2 , &B00000) Call Setarray2d(7 , 3 , &B11111) Call Setarray2d(7 , 4 , &B11111) Call Setarray2d(7 , 5 , &B11111) ' FRAME 8 Call Setarray2d(8 , 1 , &B00000) Call Setarray2d(8 , 2 , &B00000) Call Setarray2d(8 , 3 , &B00000) Call Setarray2d(8 , 4 , &B11111) Call Setarray2d(8 , 5 , &B11111) ' FRAME 9 Call Setarray2d(9 , 1 , &B00000) Call Setarray2d(9 , 2 , &B00000) Call Setarray2d(9 , 3 , &B00000) Call Setarray2d(9 , 4 , &B00000) Call Setarray2d(9 , 5 , &B11111) ' ------------------ TIMER ------------------ Startup: 'Power Up Delay to stabilize the system (optional). Waitms 250 'Set up Timer0, 8 Bit, with F = 8 MHz, PS = 64, 490.196 Intr / Sec Config Timer0 = Timer , Prescale = 64 On Timer0 Ticktock 'Run ISR 'Enable, (Turn On), the interrupts: Enable Interrupts Enable Timer0 Main: Do Loop Ticktock: 'LOOP THROUGH FRAMES If Ttc >= Frames_per_sec Then If Frame_counter < Amount_frames Then Incr Frame_counter Else Frame_counter = 1 End If Ttc = 0 End If ' TURN ON ROWS ONE BY ONE If Row > 5 Then Row = 1 End If ' TURN OFF ALL ROWS Portc = &B00000 ' TURN ON CURRENT ROW Portc.row = 1 ' TURN ON CORROSPONDING COLLUMN FOR THIS ROW & FRAME Dim Current_frame As Integer Current_frame = Getarray2d(frame_counter , Row) Portb = Current_frame ' GO TO NEXT ROW Incr Row 'Increment TickTock Counter Incr Ttc Return ' ------------------ 2D ARRAY FUNCTIONS ------------------ Function Getarray2d(byval D1 As Integer , Byval D2 As Integer) As Integer Local Warraypointer As Word Warraypointer = D1 - 1 Warraypointer = Warraypointer * Nr_of_rows Warraypointer = Warraypointer + D2 Getarray2d = Barray2d(warraypointer) End Function Sub Setarray2d(d1 As Byte , D2 As Byte , Pvalue As Byte) As Byte Local Warraypointer As Word Warraypointer = D1 - 1 Warraypointer = Warraypointer * Nr_of_rows Warraypointer = Warraypointer + D2 Barray2d(warraypointer) = Pvalue End Sub [/code:1:961c662c29] [b:961c662c29][color=red:961c662c29](BASCOM-AVR version : 2.0.7.5 , Latest : 2.0.7.8 )[/b:961c662c29][/color:961c662c29]

BASCOM-AVR : Bascom-AVR 2.0.7.8 IDE high processor load? : REPLY

$
0
0
I can cause 100% loading of the CPU consistently by checking allow multiple instances and open 2 projects in separate Bascom IDE windows. Be patient as it takes a while but eventually one of the instances will take over and 100% CPU load will occur. The project size does not seem to matter. I have tried many times with just a single IDE open and all seems well. 2 instances running will grind to a halt. Regards, Jerry

BASCOM-AVR : Bascom-AVR 2.0.7.8 IDE high processor load? : REPLY

$
0
0
ok, that is new info : you are using 2 instances. I will see if i can duplicate it.

BASCOM-AVR : Pollin LCD 20*4 SPLC780D1 : NEWTOPIC

$
0
0
Hi, did anyone have any luck getting the LCD to work with BASCOM?? http://www.pollin.de/shop/dt/MjEzOTc4OTk-/Bauelemente_Bauteile/Aktive_Bauelemente/Displays/LCD_Modul_TC2004A_01T.html I checked all the connections, and the code/pcb has previously been used with a 20*04 by another supplier (Ks077) I have tried various startup timings and also with/without the chipset=ks077 The contrast interface works, as I can see the two black bars becomming darker slowly [code:1:7c10a2d427] $regfile = "m32def.dat" $crystal = 16000000 $swstack = 96 $hwstack = 64 $framesize = 96 '############## LCD Stuff Dim Bright As Byte Dim Contrast As Byte Config Timer1 = Pwm , Prescale = 8 , Compare A Pwm = Clear Up , Compare B Pwm = Clear Down Config Portc = Output ' lcd Config Portd.4 = Output Config Portd.5 = Output Config Lcd = 20 * 4, chipset= Ks077 Config Lcdbus = 4 Config Lcdpin = Pin , Db4 = Portc.6 , Db5 = Portc.5 , Db6 = Portc.7 , Db7 = Porta.7 , E = Portc.4 , Rs = Portc.3 Dim Si As Byte Enable Interrupts Disable Int0 Disable Int1 Disable Int2 '####### Initialize everything Contrast = 20 Bright=128 Waitms 1500 cls waitms 100 Initlcd Waitms 500 Cursor Off cls Waitms 500 Start Timer1 ocr1a = contrast Ocr1b = Bright Do 'contrast setting loop for si= 1 to 255 ocr1a=si locate 1,1 lcd si locate 2,1 lcd si locate 3,1 lcd si locate 4,1 lcd si waitms 100 next loop end [/code:1:7c10a2d427] [b:7c10a2d427][color=red:7c10a2d427](BASCOM-AVR version : 2.0.7.8 )[/b:7c10a2d427][/color:7c10a2d427]

BASCOM-AVR : Pollin LCD 20*4 SPLC780D1 : REPLY

$
0
0
when you write [quote:39b045c2e2]I checked all the connections, and the code/pcb has previously been used with a 20*04 by another supplier (Ks077)[/quote:39b045c2e2] you mean you tested THIS pcb with the working ks077 LCD, right? Or is this a copy of the board? I ask because of the JTAG that could be a problem. So best to check the fuse bits first for JTAG. The display itself seems a standard one. Nothing special. The , chipset= Ks077 is not required. Config Lcdbus = 4 is not needed either since you use pinmode.

BASCOM-AVR : Bascom-AVR 2.0.7.8 IDE high processor load? : REPLY

$
0
0
i dont know how much patience is required? how much edit does this require? And in both instances? or only one? Is memory growing too ? If you close the code explorer, is it still occurring?

BASCOM-AVR : Pollin LCD 20*4 SPLC780D1 : REPLY

$
0
0
Ok, I checked the fuses (again, this has cost me 2 working days with another project before :oops: ) I wonder, as I cannot get any further than the two (l1+l3) black lines, which usually means initialisation wrong, correct?? No. THIS PCB was not tested using another display. Layout is same however. - I checked each pin on the display itself using my scope to see if I had any bad connection or something

BASCOM-AVR : Bascom-AVR 2.0.7.8 IDE high processor load? : REPLY

$
0
0
Well I've been now editing 2 instances for almost an hour and no problem. Earlier today I had it happen 2 separate times so I thought it was instance related. When it occurs and I try to close IDE, Window shows message "Not responding" and when IDE finally closes I get windows error message pop-up window. bascavr.exe: MM Operation after uninstall. FastMM has detected GetMem call after FastMM was uninstalled. Not having any problems at the moment so I'll keep working. I would imagine someone else will notice and maybe comment although I doubt many use multiple instances. Even though 1st occurrence was only single instance. Thanks for looking into this. I will post back If I can get some more information. Regards, Jerry

BASCOM-AVR : Pollin LCD 20*4 SPLC780D1 : REPLY

$
0
0
Hi Albert, you're my hero. I rechecked the pcb under the microscope. It works now after removing some flux

BASCOM-AVR : [closed] Pollin LCD 20*4 SPLC780D1 : REPLY

$
0
0
if this pcb is not known to be good, i advise to connect it to the known good lcd. you could also connect this new lcd to a working pcb. you then know if the problem is in the lcd or the board/soft. usually i check all connections one by one with a simple pin that i let toggle ; do toggle portc.6 'measure with scope waitms 500 loop this is simple but effective. I have pulled out hairs with the STK200 because for some chips the connections are not what you expect. but this simple test procedure solves this. sometimes a simple ohm meter is ok too ; measure connections one by one. sometimes you get blind when busy for too long.

BASCOM-AVR : Bascom-AVR 2.0.7.8 IDE high processor load? : REPLY

$
0
0
the memory error i have seen too once or twice but it is hard to debug since at that moment it occurs, the application has closed and there is nothing to debug. but few weeks ago i found the cause : when the explorer thread is started but you close the IDE, memory is released and then the explorer thread claims new memory to fill the code explorer tree which memory is already released. I did change that. If anyone have this problem and can reproduce it, post it here or at support.

BASCOM-AVR : [closed] Pollin LCD 20*4 SPLC780D1 : REPLY

$
0
0
i see my post crossed yours. but i leave it there for others. these are common problems. great that you found it. yes flux can be a problem. heard about that before. use 'noclean' type when possible. not an option for production but nice @home.

BASCOM-AVR : Single impulse from Timer1 in CTC mode : NEWTOPIC

$
0
0
Hello, Is it possible to generate a single 10ms impulse from Timer1 (eg OC1B output) with no interrupts in ATMEGA128? I would like to get purly hardware generated one single 10ms impulse (not a pulse wave) after setting a command/commands for triggering it. So I am looking for an alternative to this: Set PORTB.6 Waitms 10 Reset PORTB.6 But without freezeng ATMEGA for 10 ms and without interrupts. CTC mode could help? Any ideas? [b:b88cd8be14][color=red:b88cd8be14](BASCOM-AVR version : 2.0.7.8 )[/b:b88cd8be14][/color:b88cd8be14]

BASCOM-AVR : Two different $timeout values for COM1 and COM2 in ATMEGA128 : REPLY

$
0
0
Thanks Mark, After some tests I finally got Your point. Sometimes you need to repeat it twice ;) The issue is solved :)

BASCOM-AVR : Single impulse from Timer1 in CTC mode : REPLY

$
0
0
Not really. There is no hardware within the AVR which will generate a single pulse. What is your objection to using interrupts ? Interrupts are really the only way to do this, and allow other code to run until the IRQ is trigggered. Setup a timer with the correct count and prescaler, enable the relevant IRQ, set the line you want to output, start the timer, then within the IRQ reset the line and stop the timer. At most this should consume a few hundred clocks for the IRQ, probably only 20 or so if you wrote it in ASM.

BASCOM-AVR : 1111 : NEWTOPIC

$
0
0
VGNGHGHJNGH [/b][/code] $regfile = "m169def.dat" $crystal = 8000000 $hwstack = 32 $swstack = 10 $framesize = 40 Config Portd.6 = Output Set Portd.6 Config Portd.7 = Output Set Portd.7 Config Porte.2 = Input Config Porte.3 = Input Config Portb.7 = Input Set Portb.7 Enable Pcint0 Enable Pcint1 On Pcint0 Pinchange0_isr On Pcint1 Pinchange1_isr Pcmsk0 = &B11111111 Pcmsk1 = &B11111111 Enable Interrupts Dim I As Byte For I = 1 To 3 Reset Portd.6 Reset Portd.7 Waitms 200 Set Portd.6 Set Portd.7 Waitms 200 Next I Powerdown Do nop Loop End '------------------------------------------------------------------------------- '---[ Interrupt Service Routine ]----------------------------------------------- '------------------------------------------------------------------------------- Pinchange0_isr: Toggle Portd.6 Return Pinchange1_isr: Toggle Portd.7 Return [b:47c4a7e202][color=red:47c4a7e202](BASCOM-AVR version : 2.0.7.6 , Latest : 2.0.7.8 )[/b:47c4a7e202][/color:47c4a7e202]

Share your working BASCOM-AVR code here : LinkSprite UART Camera and a TinySine SIM900 GSM/GPRS Module : REPLY

$
0
0
I have attached an update to the program with the following changes. Rev 1 Changes 1. Added the ability to interface with the LinkSprite LS-Y201 camera as well as the LinkSprite IR camera (they have different "Read JPEG file" commands). 2. Moved the stop taking pictures command from the Take_Picture subroutine to the Send_Picture subroutine after download to the SIM900 is completed. This resolved the problem of banding in the images 3. Added camera reset at the beginning of Subroutine Take_Picture. 4. Added the ability to detect the end of JPEG file transmission (FF D9) from the camera to the SIM900 and then block the URC at the end. 5. In subroutine Send_MMS added the ability to detect end of JPEG file upload from the SIM900 to AT&T and then report the upload time. In late 2015 I will be updating this program to use the WDT and other features to improve the systems ability to recover from anomalies. I also plan to add the ability to use a 3G (WCDMA) module, maybe the SIM5218
Viewing all 20717 articles
Browse latest View live


Latest Images